mnemonic passphrase swb fix

This commit is contained in:
julian 2023-03-28 09:04:30 -06:00
parent b4a344ebad
commit b5488c4c6c

View file

@ -282,6 +282,7 @@ abstract class SWB {
backupWallet['id'] = manager.walletId; backupWallet['id'] = manager.walletId;
backupWallet['isFavorite'] = manager.isFavorite; backupWallet['isFavorite'] = manager.isFavorite;
backupWallet['mnemonic'] = await manager.mnemonic; backupWallet['mnemonic'] = await manager.mnemonic;
backupWallet['mnemonicPassphrase'] = await manager.mnemonicPassphrase;
backupWallet['coinName'] = manager.coin.name; backupWallet['coinName'] = manager.coin.name;
backupWallet['storedChainHeight'] = DB.instance backupWallet['storedChainHeight'] = DB.instance
.get<dynamic>(boxName: manager.walletId, key: 'storedChainHeight'); .get<dynamic>(boxName: manager.walletId, key: 'storedChainHeight');
@ -363,6 +364,7 @@ abstract class SWB {
walletId: manager.walletId, walletId: manager.walletId,
restoringStatus: StackRestoringStatus.restoring, restoringStatus: StackRestoringStatus.restoring,
mnemonic: mnemonic, mnemonic: mnemonic,
mnemonicPassphrase: mnemonicPassphrase,
); );
if (_shouldCancelRestore) { if (_shouldCancelRestore) {
@ -432,6 +434,7 @@ abstract class SWB {
address: currentAddress, address: currentAddress,
height: restoreHeight, height: restoreHeight,
mnemonic: mnemonic, mnemonic: mnemonic,
mnemonicPassphrase: mnemonicPassphrase,
); );
} catch (e, s) { } catch (e, s) {
Logging.instance.log("$e $s", level: LogLevel.Warning); Logging.instance.log("$e $s", level: LogLevel.Warning);
@ -440,6 +443,7 @@ abstract class SWB {
restoringStatus: StackRestoringStatus.failed, restoringStatus: StackRestoringStatus.failed,
manager: manager, manager: manager,
mnemonic: mnemonic, mnemonic: mnemonic,
mnemonicPassphrase: mnemonicPassphrase,
); );
return false; return false;
} }