@@ -95,7 +95,7 @@ use crate::{KeychainKind, LocalOutput, Utxo, WeightedUtxo};
9595/// builder.finish()?
9696/// };
9797///
98- /// assert_eq!(psbt1.unsigned_tx.output[..2], psbt2.unsigned_tx.output[..2]);
98+ /// assert_eq!(psbt1.psbt. unsigned_tx.output[..2], psbt2.psbt .unsigned_tx.output[..2]);
9999/// # Ok::<(), anyhow::Error>(())
100100/// ```
101101///
@@ -773,7 +773,10 @@ impl<Cs: CoinSelectionAlgorithm> TxBuilder<'_, Cs> {
773773 ///
774774 /// **WARNING**: To avoid change address reuse you must persist the changes resulting from one
775775 /// or more calls to this method before closing the wallet. See [`Wallet::reveal_next_address`].
776- pub fn finish_with_aux_rand ( self , rng : & mut impl RngCore ) -> Result < BuilderResult , CreateTxError > {
776+ pub fn finish_with_aux_rand (
777+ self ,
778+ rng : & mut impl RngCore ,
779+ ) -> Result < BuilderResult , CreateTxError > {
777780 self . wallet . create_tx ( self . coin_selection , self . params , rng)
778781 }
779782}
@@ -1235,7 +1238,12 @@ mod test {
12351238 . drain_wallet ( )
12361239 . drain_to ( recipient. script_pubkey ( ) ) ;
12371240 let tx = builder. finish ( ) . unwrap ( ) ;
1238- let output = tx. unsigned_tx . output . first ( ) . expect ( "must have one output" ) ;
1241+ let output = tx
1242+ . psbt
1243+ . unsigned_tx
1244+ . output
1245+ . first ( )
1246+ . expect ( "must have one output" ) ;
12391247 assert_eq ! ( output. value, Amount :: ONE_BTC * 6 ) ;
12401248 }
12411249
@@ -1248,7 +1256,12 @@ mod test {
12481256 . drain_wallet ( )
12491257 . drain_to ( recipient. script_pubkey ( ) ) ;
12501258 let tx = builder. finish ( ) . unwrap ( ) ;
1251- let output = tx. unsigned_tx . output . first ( ) . expect ( "must have one output" ) ;
1259+ let output = tx
1260+ . psbt
1261+ . unsigned_tx
1262+ . output
1263+ . first ( )
1264+ . expect ( "must have one output" ) ;
12521265 assert_eq ! ( output. value, Amount :: ONE_BTC * 3 ) ;
12531266 }
12541267
@@ -1261,7 +1274,12 @@ mod test {
12611274 . drain_wallet ( )
12621275 . drain_to ( recipient. script_pubkey ( ) ) ;
12631276 let tx = builder. finish ( ) . unwrap ( ) ;
1264- let output = tx. unsigned_tx . output . first ( ) . expect ( "must have one output" ) ;
1277+ let output = tx
1278+ . psbt
1279+ . unsigned_tx
1280+ . output
1281+ . first ( )
1282+ . expect ( "must have one output" ) ;
12651283 assert_eq ! ( output. value, Amount :: ONE_BTC ) ;
12661284 }
12671285 }
@@ -1297,7 +1315,7 @@ mod test {
12971315 builder. fee_absolute ( Amount :: from_sat ( 1_000 ) ) ;
12981316 let psbt = builder. finish ( ) . unwrap ( ) ;
12991317
1300- let tx = psbt. extract_tx ( ) . unwrap ( ) ;
1318+ let tx = psbt. psbt . extract_tx ( ) . unwrap ( ) ;
13011319 let txid = tx. compute_txid ( ) ;
13021320 let feerate = wallet. calculate_fee_rate ( & tx) . unwrap ( ) . to_sat_per_kwu ( ) ;
13031321 insert_tx ( & mut wallet, tx) ;
0 commit comments