mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 17:27:37 +00:00
reset address balances before updating unspents (#1707)
This commit is contained in:
parent
b6e8970dca
commit
4c55d96647
1 changed files with 5 additions and 0 deletions
|
@ -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 {
|
await Future.wait(walletAddresses.allAddresses.map((address) async {
|
||||||
updatedUnspentCoins.addAll(await fetchUnspent(address));
|
updatedUnspentCoins.addAll(await fetchUnspent(address));
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in a new issue