mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
bandaid fix xmr/wow address not showing up on recdeive screen on first wallet open after restore from seed
This commit is contained in:
parent
fee884cc16
commit
2e679882db
2 changed files with 36 additions and 0 deletions
|
@ -395,6 +395,24 @@ class MoneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
walletInfo.address = wallet.walletAddresses.address;
|
||||
await DB.instance
|
||||
.add<WalletInfo>(boxName: WalletInfo.boxName, value: walletInfo);
|
||||
if (walletInfo.address != null) {
|
||||
final newReceivingAddress = await getCurrentReceivingAddress() ??
|
||||
Address(
|
||||
walletId: walletId,
|
||||
derivationIndex: 0,
|
||||
derivationPath: null,
|
||||
value: walletInfo.address!,
|
||||
publicKey: [],
|
||||
type: AddressType.cryptonote,
|
||||
subType: AddressSubType.receiving,
|
||||
);
|
||||
|
||||
await mainDB.updateOrPutAddresses([newReceivingAddress]);
|
||||
await info.updateReceivingAddress(
|
||||
newAddress: newReceivingAddress.value,
|
||||
isar: mainDB.isar,
|
||||
);
|
||||
}
|
||||
cwWalletBase?.close();
|
||||
cwWalletBase = wallet as MoneroWalletBase;
|
||||
} catch (e, s) {
|
||||
|
|
|
@ -444,6 +444,24 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
.add<WalletInfo>(boxName: WalletInfo.boxName, value: walletInfo);
|
||||
cwWalletBase?.close();
|
||||
cwWalletBase = wallet;
|
||||
if (walletInfo.address != null) {
|
||||
final newReceivingAddress = await getCurrentReceivingAddress() ??
|
||||
Address(
|
||||
walletId: walletId,
|
||||
derivationIndex: 0,
|
||||
derivationPath: null,
|
||||
value: walletInfo.address!,
|
||||
publicKey: [],
|
||||
type: AddressType.cryptonote,
|
||||
subType: AddressSubType.receiving,
|
||||
);
|
||||
|
||||
await mainDB.updateOrPutAddresses([newReceivingAddress]);
|
||||
await info.updateReceivingAddress(
|
||||
newAddress: newReceivingAddress.value,
|
||||
isar: mainDB.isar,
|
||||
);
|
||||
}
|
||||
} catch (e, s) {
|
||||
Logging.instance.log("$e\n$s", level: LogLevel.Fatal);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue