mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 17:27:37 +00:00
fix valid seed check for non bip39 wallets
Some checks are pending
Cache Dependencies / test (push) Waiting to run
Some checks are pending
Cache Dependencies / test (push) Waiting to run
This commit is contained in:
parent
331d6ee648
commit
c6b0b7ff4e
1 changed files with 5 additions and 2 deletions
|
@ -284,8 +284,11 @@ class WalletRestorePage extends BasePage {
|
|||
}
|
||||
|
||||
// bip39:
|
||||
const validSeedLengths = [12, 18, 24];
|
||||
if (!(validSeedLengths.contains(seedWords.length))) {
|
||||
final validBip39SeedLengths = [12, 18, 24];
|
||||
final nonBip39WalletTypes = [WalletType.monero, WalletType.wownero, WalletType.haven];
|
||||
// if it's a bip39 wallet and the length is not valid return false
|
||||
if (!nonBip39WalletTypes.contains(walletRestoreViewModel.type) &&
|
||||
!(validBip39SeedLengths.contains(seedWords.length))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue