ensure utxos are fetched after refreshing transactions to ensure bip47 notification utxos are not included in balances

This commit is contained in:
julian 2023-02-15 17:26:44 -06:00
parent 76794f14b8
commit 7e2276394c

View file

@ -1024,7 +1024,6 @@ class BitcoinWallet extends CoinServiceAPI
await checkAllCurrentReceivingPaynymAddressesForTransactions(); await checkAllCurrentReceivingPaynymAddressesForTransactions();
final fetchFuture = _refreshTransactions(); final fetchFuture = _refreshTransactions();
final utxosRefreshFuture = _updateUTXOs();
GlobalEventBus.instance GlobalEventBus.instance
.fire(RefreshPercentChangedEvent(0.50, walletId)); .fire(RefreshPercentChangedEvent(0.50, walletId));
@ -1036,12 +1035,12 @@ class BitcoinWallet extends CoinServiceAPI
.fire(RefreshPercentChangedEvent(0.70, walletId)); .fire(RefreshPercentChangedEvent(0.70, walletId));
_feeObject = Future(() => feeObj); _feeObject = Future(() => feeObj);
await utxosRefreshFuture; await fetchFuture;
GlobalEventBus.instance GlobalEventBus.instance
.fire(RefreshPercentChangedEvent(0.80, walletId)); .fire(RefreshPercentChangedEvent(0.80, walletId));
await fetchFuture;
await checkForNotificationTransactionsTo(codesToCheck); await checkForNotificationTransactionsTo(codesToCheck);
await _updateUTXOs();
await getAllTxsToWatch(); await getAllTxsToWatch();
GlobalEventBus.instance GlobalEventBus.instance
.fire(RefreshPercentChangedEvent(0.90, walletId)); .fire(RefreshPercentChangedEvent(0.90, walletId));