trezor: more user friendly when cannot connect
Tell the user and ask if they want to try again. If they say no, raise a silent exception. Apply this more friendly behaviour to the install wizard too (see issue #1668).
This commit is contained in:
@@ -11,9 +11,8 @@ from ..hw_wallet.qt import QtHandlerBase
|
||||
|
||||
from electrum.i18n import _
|
||||
from electrum.plugins import hook, DeviceMgr
|
||||
from electrum.util import PrintError
|
||||
from electrum.util import PrintError, UserCancelled
|
||||
from electrum.wallet import Wallet, BIP44_Wallet
|
||||
from electrum.wizard import UserCancelled
|
||||
|
||||
PASSPHRASE_HELP_SHORT =_(
|
||||
"Passphrases allow you to access new wallets, each "
|
||||
@@ -317,10 +316,7 @@ def qt_plugin_class(base_plugin_class):
|
||||
device_id = self.device_manager().wallet_id(window.wallet)
|
||||
if not device_id:
|
||||
info = self.device_manager().select_device(window.wallet, self)
|
||||
if info:
|
||||
device_id = info.device.id_
|
||||
else:
|
||||
window.wallet.handler.show_error(_("No devices found"))
|
||||
device_id = info.device.id_
|
||||
return device_id
|
||||
|
||||
def query_choice(self, window, msg, choices):
|
||||
|
||||
Reference in New Issue
Block a user