fix valid seed check for non bip39 wallets
Some checks are pending
Cache Dependencies / test (push) Waiting to run

This commit is contained in:
OmarHatem 2024-09-27 03:34:33 +03:00
parent 331d6ee648
commit c6b0b7ff4e

View file

@ -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;
}