@@ -28,7 +28,11 @@ fn unconfirmed() -> Result<(), ProofError> {
2828 ) ?;
2929
3030 let balance = wallet. get_balance ( ) ?;
31- assert ! ( balance > 10_000 , "insufficient balance: {}" , balance) ;
31+ assert ! (
32+ balance. confirmed > 10_000 ,
33+ "insufficient balance: {}" ,
34+ balance. confirmed
35+ ) ;
3236 let addr = wallet. get_address ( AddressIndex :: New ) . unwrap ( ) ;
3337 assert_eq ! (
3438 addr. to_string( ) ,
@@ -58,7 +62,7 @@ fn unconfirmed() -> Result<(), ProofError> {
5862 assert ! ( finalized) ;
5963
6064 let spendable = wallet. verify_proof ( & psbt, message, None ) ?;
61- assert_eq ! ( spendable, new_balance) ;
65+ assert_eq ! ( spendable, new_balance. confirmed ) ;
6266
6367 Ok ( ( ) )
6468}
@@ -73,7 +77,11 @@ fn confirmed() {
7377 . unwrap ( ) ;
7478
7579 let balance = wallet. get_balance ( ) . unwrap ( ) ;
76- assert ! ( balance > 10_000 , "insufficient balance: {}" , balance) ;
80+ assert ! (
81+ balance. confirmed > 10_000 ,
82+ "insufficient balance: {}" ,
83+ balance
84+ ) ;
7785 let addr = wallet. get_address ( AddressIndex :: New ) . unwrap ( ) ;
7886 assert_eq ! (
7987 addr. to_string( ) ,
@@ -109,5 +117,5 @@ fn confirmed() {
109117 let spendable = wallet
110118 . verify_proof ( & psbt, message, Some ( max_confirmation_height) )
111119 . unwrap ( ) ;
112- assert_eq ! ( spendable, new_balance) ;
120+ assert_eq ! ( spendable, new_balance. confirmed ) ;
113121}
0 commit comments