fix a bug with hw devices.
if a device is unplugged and then replugged before we notice (via scan_devices) then it will get into an unusable state, throwing all kinds of low level exceptions when we don't expect it. affects ledger, keepkey, dbb, but for some reason not trezor.
This commit is contained in:
@@ -113,6 +113,14 @@ class KeepKeyClientBase(GuiMixin, PrintError):
|
||||
def is_pairable(self):
|
||||
return not self.features.bootloader_mode
|
||||
|
||||
def has_usable_connection_with_device(self):
|
||||
try:
|
||||
res = self.ping("electrum pinging device")
|
||||
assert res == "electrum pinging device"
|
||||
except BaseException:
|
||||
return False
|
||||
return True
|
||||
|
||||
def used(self):
|
||||
self.last_operation = time.time()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user