Browse Source

Remove duplicate code

Cut-n-paste somehow into the same class
283
Neil Booth 9 years ago
parent
commit
cf4ee487cd
  1. 18
      plugins/trezor/plugin.py

18
plugins/trezor/plugin.py

@ -337,21 +337,3 @@ class TrezorCompatiblePlugin(BasePlugin):
@staticmethod
def is_valid_seed(seed):
return True
def on_restore_wallet(self, wallet, wizard):
assert isinstance(wallet, self.wallet_class)
msg = _("Enter the seed for your %s wallet:" % self.device)
seed = wizard.request_seed(msg, is_valid = self.is_valid_seed)
# Restored wallets are not hardware wallets
wallet_class = self.wallet_class.restore_wallet_class
wallet.storage.put('wallet_type', wallet_class.wallet_type)
wallet = wallet_class(wallet.storage)
passphrase = wizard.request_passphrase(self.device, restore=True)
password = wizard.request_password()
wallet.add_seed(seed, password)
wallet.add_cosigner_seed(seed, 'x/', password, passphrase)
wallet.create_main_account(password)
return wallet

Loading…
Cancel
Save