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:
@@ -82,6 +82,13 @@ class DigitalBitbox_Client():
|
||||
def is_paired(self):
|
||||
return self.password is not None
|
||||
|
||||
def has_usable_connection_with_device(self):
|
||||
try:
|
||||
self.dbb_has_password()
|
||||
except BaseException:
|
||||
return False
|
||||
return True
|
||||
|
||||
def _get_xpub(self, bip32_path):
|
||||
if self.check_device_dialog():
|
||||
return self.hid_send_encrypt(b'{"xpub": "%s"}' % bip32_path.encode('utf8'))
|
||||
|
||||
Reference in New Issue
Block a user