Browse Source

fix plugin restore: wallet_type

master
ThomasV 11 years ago
parent
commit
c130ff6715
  1. 1
      gui/qt/installwizard.py
  2. 2
      plugins/trezor.py

1
gui/qt/installwizard.py

@ -538,6 +538,7 @@ class InstallWizard(QDialog):
wallet.create_main_account(password) wallet.create_main_account(password)
else: else:
self.storage.put('wallet_type', t)
wallet = run_hook('installwizard_restore', self, self.storage) wallet = run_hook('installwizard_restore', self, self.storage)
if not wallet: if not wallet:
return return

2
plugins/trezor.py

@ -81,6 +81,8 @@ class Plugin(BasePlugin):
wallet_types.append(('trezor', _("Trezor wallet"), TrezorWallet)) wallet_types.append(('trezor', _("Trezor wallet"), TrezorWallet))
def installwizard_restore(self, wizard, storage): def installwizard_restore(self, wizard, storage):
if storage.get('wallet_type') != 'trezor':
return
wallet = TrezorWallet(storage) wallet = TrezorWallet(storage)
try: try:
wallet.create_main_account(None) wallet.create_main_account(None)

Loading…
Cancel
Save