@@ -15,6 +15,8 @@ use crate::keys::{DescriptorPublicKey, DescriptorSecretKey, Mnemonic};
1515use crate :: psbt:: PartiallySignedTransaction ;
1616use crate :: wallet:: { BumpFeeTxBuilder , TxBuilder , Wallet } ;
1717use bdk:: bitcoin:: blockdata:: script:: Script as BdkScript ;
18+ use bdk:: bitcoin:: blockdata:: transaction:: TxIn as BdkTxIn ;
19+ use bdk:: bitcoin:: blockdata:: transaction:: TxOut as BdkTxOut ;
1820use bdk:: bitcoin:: consensus:: Decodable ;
1921use bdk:: bitcoin:: psbt:: serialize:: Serialize ;
2022use bdk:: bitcoin:: {
@@ -25,6 +27,7 @@ use bdk::database::any::{SledDbConfiguration, SqliteDbConfiguration};
2527use bdk:: keys:: bip39:: WordCount ;
2628use bdk:: wallet:: AddressIndex as BdkAddressIndex ;
2729use bdk:: wallet:: AddressInfo as BdkAddressInfo ;
30+ use bdk:: LocalUtxo as BdkLocalUtxo ;
2831use bdk:: { Balance as BdkBalance , BlockTime , Error as BdkError , FeeRate , KeychainKind } ;
2932use std:: convert:: From ;
3033use std:: fmt;
@@ -49,7 +52,7 @@ pub struct AddressInfo {
4952}
5053
5154impl From < BdkAddressInfo > for AddressInfo {
52- fn from ( x : bdk:: wallet:: AddressInfo ) -> AddressInfo {
55+ fn from ( x : bdk:: wallet:: AddressInfo ) -> Self {
5356 AddressInfo {
5457 index : x. index ,
5558 address : x. address . to_string ( ) ,
@@ -85,7 +88,7 @@ pub enum AddressIndex {
8588}
8689
8790impl From < AddressIndex > for BdkAddressIndex {
88- fn from ( x : AddressIndex ) -> BdkAddressIndex {
91+ fn from ( x : AddressIndex ) -> Self {
8992 match x {
9093 AddressIndex :: New => BdkAddressIndex :: New ,
9194 AddressIndex :: LastUnused => BdkAddressIndex :: LastUnused ,
@@ -143,7 +146,7 @@ pub struct OutPoint {
143146}
144147
145148impl From < & OutPoint > for BdkOutPoint {
146- fn from ( x : & OutPoint ) -> BdkOutPoint {
149+ fn from ( x : & OutPoint ) -> Self {
147150 BdkOutPoint {
148151 txid : Txid :: from_str ( & x. txid ) . unwrap ( ) ,
149152 vout : x. vout ,
@@ -188,8 +191,8 @@ pub struct TxOut {
188191 script_pubkey : Arc < Script > ,
189192}
190193
191- impl From < & bdk :: bitcoin :: blockdata :: transaction :: TxOut > for TxOut {
192- fn from ( x : & bdk :: bitcoin :: blockdata :: transaction :: TxOut ) -> Self {
194+ impl From < & BdkTxOut > for TxOut {
195+ fn from ( x : & BdkTxOut ) -> Self {
193196 TxOut {
194197 value : x. value ,
195198 script_pubkey : Arc :: new ( Script {
@@ -206,8 +209,8 @@ pub struct LocalUtxo {
206209 is_spent : bool ,
207210}
208211
209- impl From < bdk :: LocalUtxo > for LocalUtxo {
210- fn from ( local_utxo : bdk :: LocalUtxo ) -> Self {
212+ impl From < BdkLocalUtxo > for LocalUtxo {
213+ fn from ( local_utxo : BdkLocalUtxo ) -> Self {
211214 LocalUtxo {
212215 outpoint : OutPoint {
213216 txid : local_utxo. outpoint . txid . to_string ( ) ,
@@ -216,7 +219,7 @@ impl From<bdk::LocalUtxo> for LocalUtxo {
216219 txout : TxOut {
217220 value : local_utxo. txout . value ,
218221 script_pubkey : Arc :: new ( Script {
219- script : local_utxo. txout . script_pubkey . clone ( ) ,
222+ script : local_utxo. txout . script_pubkey ,
220223 } ) ,
221224 } ,
222225 keychain : local_utxo. keychain ,
@@ -257,8 +260,8 @@ pub struct TxIn {
257260 pub witness : Vec < Vec < u8 > > ,
258261}
259262
260- impl From < & bdk :: bitcoin :: blockdata :: transaction :: TxIn > for TxIn {
261- fn from ( x : & bdk :: bitcoin :: blockdata :: transaction :: TxIn ) -> TxIn {
263+ impl From < & BdkTxIn > for TxIn {
264+ fn from ( x : & BdkTxIn ) -> Self {
262265 TxIn {
263266 previous_output : OutPoint {
264267 txid : x. previous_output . txid . to_string ( ) ,
0 commit comments