Add a GUI messagebox when using a Trezor but can't connect to the device.
This commit is contained in:
parent
78469f488a
commit
2afe4e30f7
|
@ -94,7 +94,7 @@ class TrezorWallet(NewWallet):
|
||||||
NewWallet.__init__(self, storage)
|
NewWallet.__init__(self, storage)
|
||||||
|
|
||||||
self.seed = 'trezor'
|
self.seed = 'trezor'
|
||||||
|
|
||||||
self.storage.put('gap_limit', 20, False) #obey BIP44 gap limit of 20
|
self.storage.put('gap_limit', 20, False) #obey BIP44 gap limit of 20
|
||||||
|
|
||||||
self.use_encryption = False
|
self.use_encryption = False
|
||||||
|
@ -133,6 +133,8 @@ class TrezorWallet(NewWallet):
|
||||||
d = HidTransport.enumerate()[0]
|
d = HidTransport.enumerate()[0]
|
||||||
self.transport = HidTransport(d)
|
self.transport = HidTransport(d)
|
||||||
except:
|
except:
|
||||||
|
d = QDialog()
|
||||||
|
QMessageBox.warning(d, _('Warning'), _('Could not connect to your Trezor. Please verify the cable is connected and that no other app is using it.'), _('OK'))
|
||||||
raise Exception("Trezor not found")
|
raise Exception("Trezor not found")
|
||||||
self.client = QtGuiTrezorClient(self.transport)
|
self.client = QtGuiTrezorClient(self.transport)
|
||||||
self.client.set_tx_api(self)
|
self.client.set_tx_api(self)
|
||||||
|
|
Loading…
Reference in New Issue