Skip to content

Commit

Permalink
use the correct purpose when choosing hw device after setup_device fa…
Browse files Browse the repository at this point in the history
…iled

When for some reason the hw device fails setup (#170 for instance), make sure the hw selection is done again  with the same purpose. This prevents calling `on_device(purpose=HWD_SETUP_NEW_WALLET)` when the real purpose is to decrypt an existing wallet file (`HWD_SETUP_DECRYPT_WALLET`)
Closes #168
  • Loading branch information
PiRK committed Dec 13, 2021
1 parent 15f0bb2 commit efe9de2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion electroncash/base_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def on_device(self, name, device_info, *, purpose):
# This prevents showing an empty "UserCancelled" message
self.print_error(traceback.format_exc())
self.show_error(str(e))
self.choose_hw_device()
self.choose_hw_device(purpose)
return
if purpose == HWD_SETUP_NEW_WALLET:
if self.wallet_type == 'multisig':
Expand Down

0 comments on commit efe9de2

Please sign in to comment.