Merge pull request #103 from cake-tech/CAKE-294-account-creating-bug

CAKE-294 | wallet saved when accounts and subaddresses are changed
This commit is contained in:
M 2021-04-06 18:55:47 +03:00
commit 7e6de105b8

View file

@ -100,8 +100,10 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance> with Store {
Future<void> 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),