Skip to content

Commit afeb4da

Browse files
committed
chore: organize some imports
1 parent e103a53 commit afeb4da

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

crates/bdk/src/wallet/tx_builder.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,21 @@
3939
//! let psbt = tx_builder.finish()?;
4040
//! # Ok::<(), anyhow::Error>(())
4141
//! ```
42-
43-
use crate::collections::BTreeMap;
44-
use crate::collections::HashSet;
4542
use alloc::{boxed::Box, rc::Rc, string::String, vec::Vec};
46-
use bdk_chain::PersistBackend;
4743
use core::cell::RefCell;
4844
use core::fmt;
4945
use core::marker::PhantomData;
5046

47+
use bdk_chain::PersistBackend;
5148
use bitcoin::psbt::{self, PartiallySignedTransaction as Psbt};
52-
use bitcoin::{absolute, script::PushBytes, OutPoint, ScriptBuf, Sequence, Transaction, Txid};
49+
use bitcoin::script::PushBytes;
50+
use bitcoin::{absolute, FeeRate, OutPoint, ScriptBuf, Sequence, Transaction, Txid};
5351

5452
use super::coin_selection::{CoinSelectionAlgorithm, DefaultCoinSelectionAlgorithm};
55-
use super::ChangeSet;
56-
use crate::types::{KeychainKind, LocalOutput, WeightedUtxo};
57-
use crate::wallet::CreateTxError;
58-
use crate::{Utxo, Wallet};
59-
use bitcoin::FeeRate;
53+
use super::{ChangeSet, CreateTxError, Wallet};
54+
use crate::collections::{BTreeMap, HashSet};
55+
use crate::{KeychainKind, LocalOutput, Utxo, WeightedUtxo};
56+
6057
/// Context in which the [`TxBuilder`] is valid
6158
pub trait TxBuilderContext: core::fmt::Debug + Default + Clone {}
6259

crates/bdk/tests/wallet.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@ use bdk::KeychainKind;
1313
use bdk_chain::COINBASE_MATURITY;
1414
use bdk_chain::{BlockId, ConfirmationTime};
1515
use bitcoin::hashes::Hash;
16+
use bitcoin::psbt;
17+
use bitcoin::script::PushBytesBuf;
1618
use bitcoin::sighash::{EcdsaSighashType, TapSighashType};
17-
use bitcoin::Amount;
18-
use bitcoin::FeeRate;
19-
use bitcoin::ScriptBuf;
19+
use bitcoin::taproot::TapNodeHash;
2020
use bitcoin::{
21-
absolute, script::PushBytesBuf, taproot::TapNodeHash, Address, OutPoint, Sequence, Transaction,
22-
TxIn, TxOut, Weight,
21+
absolute, Address, Amount, BlockHash, FeeRate, Network, OutPoint, ScriptBuf, Sequence,
22+
Transaction, TxIn, TxOut, Txid, Weight,
2323
};
24-
use bitcoin::{psbt, Network};
25-
use bitcoin::{BlockHash, Txid};
2624
mod common;
2725
use common::*;
2826

0 commit comments

Comments
 (0)