From e10387a1b6174e03b566753ad7748b9ef82d0aa5 Mon Sep 17 00:00:00 2001 From: OleksandrSobol Date: Mon, 30 Nov 2020 20:27:44 +0200 Subject: [PATCH] CAKE-158 | called update() method for accountList in the _onNewBlock() and rescan() methods (monero_wallet.dart) --- lib/monero/monero_wallet.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/monero/monero_wallet.dart b/lib/monero/monero_wallet.dart index 81a3ab7a..f4774b68 100644 --- a/lib/monero/monero_wallet.dart +++ b/lib/monero/monero_wallet.dart @@ -98,7 +98,7 @@ abstract class MoneroWalletBase extends WalletBase with Store { bool _isSavingAfterNewTransaction; Future init() async { - await accountList.update(); + accountList.update(); account = accountList.accounts.first; subaddressList.update(accountIndex: account.id ?? 0); subaddress = subaddressList.getAll().first; @@ -260,6 +260,7 @@ abstract class MoneroWalletBase extends WalletBase with Store { monero_wallet.rescanBlockchainAsync(); await startSync(); _askForUpdateBalance(); + accountList.update(); await _askForUpdateTransactionHistory(); await save(); await walletInfo.save(); @@ -369,11 +370,13 @@ abstract class MoneroWalletBase extends WalletBase with Store { if (walletInfo.isRecovery) { await _askForUpdateTransactionHistory(); _askForUpdateBalance(); + accountList.update(); } if (blocksLeft < 100) { await _askForUpdateTransactionHistory(); _askForUpdateBalance(); + accountList.update(); syncStatus = SyncedSyncStatus(); await _afterSyncSave();