@@ -617,12 +617,13 @@ class WCHaveSeed(WizardComponent, Logger):
|
||||
self.layout().addStretch(1)
|
||||
|
||||
def is_seed(self, x):
|
||||
t = mnemonic.seed_type(x)
|
||||
if self.wizard_data['wallet_type'] == 'standard':
|
||||
return mnemonic.is_seed(x)
|
||||
elif self.wizard_data['wallet_type'] == '2fa':
|
||||
return mnemonic.is_any_2fa_seed_type(x)
|
||||
return mnemonic.is_any_2fa_seed_type(t)
|
||||
else:
|
||||
return mnemonic.seed_type(x) in ['standard', 'segwit']
|
||||
return t in ['standard', 'segwit']
|
||||
|
||||
def validate(self):
|
||||
# precond: only call when SeedLayout deems seed a valid seed
|
||||
|
||||
@@ -189,6 +189,7 @@ class Test_seeds(ElectrumTestCase):
|
||||
('9dk', 'segwit'),
|
||||
('abandon bike', 'segwit'), # <- has valid English words
|
||||
('6vs', '2fa_segwit'),
|
||||
('agree install', '2fa_segwit'), # <- has valid English words
|
||||
}
|
||||
|
||||
def test_new_seed(self):
|
||||
|
||||
Reference in New Issue
Block a user