mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
reset address balances before updating unspents (#1707)
This commit is contained in:
@@ -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));
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user