mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
fix initial xmr/wow address not showing up on first wallet open
This commit is contained in:
parent
5eb276b6fc
commit
7cef4c45eb
2 changed files with 24 additions and 0 deletions
|
@ -126,6 +126,18 @@ class MoneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
|
||||
await updateNode();
|
||||
|
||||
Address? currentAddress = await getCurrentReceivingAddress();
|
||||
if (currentAddress == null) {
|
||||
currentAddress = addressFor(index: 0);
|
||||
await mainDB.updateOrPutAddresses([currentAddress]);
|
||||
}
|
||||
if (info.cachedReceivingAddress != currentAddress.value) {
|
||||
await info.updateReceivingAddress(
|
||||
newAddress: currentAddress.value,
|
||||
isar: mainDB.isar,
|
||||
);
|
||||
}
|
||||
|
||||
await CwBasedInterface.cwWalletBase?.startSync();
|
||||
unawaited(refresh());
|
||||
autoSaveTimer?.cancel();
|
||||
|
|
|
@ -452,6 +452,18 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
|
||||
await updateNode();
|
||||
|
||||
Address? currentAddress = await getCurrentReceivingAddress();
|
||||
if (currentAddress == null) {
|
||||
currentAddress = addressFor(index: 0);
|
||||
await mainDB.updateOrPutAddresses([currentAddress]);
|
||||
}
|
||||
if (info.cachedReceivingAddress != currentAddress.value) {
|
||||
await info.updateReceivingAddress(
|
||||
newAddress: currentAddress.value,
|
||||
isar: mainDB.isar,
|
||||
);
|
||||
}
|
||||
|
||||
await (CwBasedInterface.cwWalletBase as WowneroWalletBase?)?.startSync();
|
||||
unawaited(refresh());
|
||||
autoSaveTimer?.cancel();
|
||||
|
|
Loading…
Reference in a new issue