From d4d6d05d9feb6d4c729678e0616bcab8cb69d3d3 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Thu, 16 Mar 2023 17:40:30 +0000 Subject: [PATCH] qml wizard: enable restore from "2fa" legacy seeds not sure why it was disabled, there should be no meaningful distinction at that point --- electrum/wizard.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/electrum/wizard.py b/electrum/wizard.py index 9e8358982..10a34f457 100644 --- a/electrum/wizard.py +++ b/electrum/wizard.py @@ -9,6 +9,8 @@ from electrum.wallet_db import WalletDB from electrum.bip32 import normalize_bip32_derivation, xpub_type from electrum import keystore from electrum import bitcoin +from electrum.mnemonic import is_any_2fa_seed_type + class WizardViewState(NamedTuple): view: str @@ -365,7 +367,7 @@ class NewWalletWizard(AbstractWizard): derivation = normalize_bip32_derivation(data['derivation_path']) script = data['script_type'] if data['script_type'] != 'p2pkh' else 'standard' k = keystore.from_bip43_rootseed(root_seed, derivation, xtype=script) - elif data['seed_type'] == '2fa_segwit': # TODO: legacy 2fa '2fa' + elif is_any_2fa_seed_type(data['seed_type']): self._logger.debug('creating keystore from 2fa seed') k = keystore.from_xprv(data['x1/']['xprv']) else: