mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
CAKE-294 | wallet saved when accounts and subaddresses are changed
This commit is contained in:
parent
4a62e2db33
commit
a1fe786af2
1 changed files with 2 additions and 0 deletions
|
@ -100,8 +100,10 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance> with Store {
|
||||||
|
|
||||||
Future<void> init() async {
|
Future<void> init() async {
|
||||||
accountList.update();
|
accountList.update();
|
||||||
|
accountList.accounts.observe((_) async => await save());
|
||||||
account = accountList.accounts.first;
|
account = accountList.accounts.first;
|
||||||
subaddressList.update(accountIndex: account.id ?? 0);
|
subaddressList.update(accountIndex: account.id ?? 0);
|
||||||
|
subaddressList.subaddresses.observe((_) async => await save());
|
||||||
subaddress = subaddressList.getAll().first;
|
subaddress = subaddressList.getAll().first;
|
||||||
balance = MoneroBalance(
|
balance = MoneroBalance(
|
||||||
fullBalance: monero_wallet.getFullBalance(accountIndex: account.id),
|
fullBalance: monero_wallet.getFullBalance(accountIndex: account.id),
|
||||||
|
|
Loading…
Reference in a new issue