From 7e2276394cf8a97fdefbd433474f361e9203fe40 Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 15 Feb 2023 17:26:44 -0600 Subject: [PATCH] ensure utxos are fetched after refreshing transactions to ensure bip47 notification utxos are not included in balances --- lib/services/coins/bitcoin/bitcoin_wallet.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/services/coins/bitcoin/bitcoin_wallet.dart b/lib/services/coins/bitcoin/bitcoin_wallet.dart index efaa1de98..521e2dc9e 100644 --- a/lib/services/coins/bitcoin/bitcoin_wallet.dart +++ b/lib/services/coins/bitcoin/bitcoin_wallet.dart @@ -1024,7 +1024,6 @@ class BitcoinWallet extends CoinServiceAPI await checkAllCurrentReceivingPaynymAddressesForTransactions(); final fetchFuture = _refreshTransactions(); - final utxosRefreshFuture = _updateUTXOs(); GlobalEventBus.instance .fire(RefreshPercentChangedEvent(0.50, walletId)); @@ -1036,12 +1035,12 @@ class BitcoinWallet extends CoinServiceAPI .fire(RefreshPercentChangedEvent(0.70, walletId)); _feeObject = Future(() => feeObj); - await utxosRefreshFuture; + await fetchFuture; GlobalEventBus.instance .fire(RefreshPercentChangedEvent(0.80, walletId)); - await fetchFuture; await checkForNotificationTransactionsTo(codesToCheck); + await _updateUTXOs(); await getAllTxsToWatch(); GlobalEventBus.instance .fire(RefreshPercentChangedEvent(0.90, walletId));