File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 33use std:: ffi:: CString ;
44use std:: os:: raw:: c_char;
55use std:: ptr;
6-
6+ use key_wallet :: wallet :: managed_wallet_info :: wallet_info_interface :: WalletInfoInterface ;
77use crate :: error:: { FFIError , FFIErrorCode } ;
88use crate :: managed_wallet:: FFIManagedWalletInfo ;
99
@@ -119,9 +119,9 @@ pub unsafe extern "C" fn managed_wallet_get_utxos(
119119 // Get script bytes
120120 let script_bytes = utxo. txout . script_pubkey . as_bytes ( ) . to_vec ( ) ;
121121
122- // Calculate confirmations (0 if unconfirmed)
123- let confirmations = if utxo. is_confirmed {
124- 1
122+ let current_height = managed_info . inner ( ) . synced_height ( ) ;
123+ let confirmations = if utxo. is_confirmed && utxo . height > 0 {
124+ current_height - utxo . height + 1
125125 } else {
126126 0
127127 } ;
You can’t perform that action at this time.
0 commit comments