diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 71e537186..f291247b8 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -1272,6 +1272,11 @@ abstract class ElectrumWalletBase }); } + // Set the balance of all non-silent payment addresses to 0 before updating + walletAddresses.allAddresses.forEach((addr) { + if(addr is! BitcoinSilentPaymentAddressRecord) addr.balance = 0; + }); + await Future.wait(walletAddresses.allAddresses.map((address) async { updatedUnspentCoins.addAll(await fetchUnspent(address)); }));