From a1fe786af20501c87c8626c3594bb2b3b7afd4dc Mon Sep 17 00:00:00 2001 From: OleksandrSobol Date: Tue, 30 Mar 2021 19:43:07 +0300 Subject: [PATCH] CAKE-294 | wallet saved when accounts and subaddresses are changed --- lib/monero/monero_wallet.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/monero/monero_wallet.dart b/lib/monero/monero_wallet.dart index 0891100c..ac7f0cd9 100644 --- a/lib/monero/monero_wallet.dart +++ b/lib/monero/monero_wallet.dart @@ -100,8 +100,10 @@ abstract class MoneroWalletBase extends WalletBase with Store { Future init() async { accountList.update(); + accountList.accounts.observe((_) async => await save()); account = accountList.accounts.first; subaddressList.update(accountIndex: account.id ?? 0); + subaddressList.subaddresses.observe((_) async => await save()); subaddress = subaddressList.getAll().first; balance = MoneroBalance( fullBalance: monero_wallet.getFullBalance(accountIndex: account.id),