Browse Source

abstract qt away from trezor

3.2.x
SomberNight 7 years ago
parent
commit
364cfd17ae
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 5
      plugins/trezor/qt.py
  2. 2
      plugins/trezor/trezor.py

5
plugins/trezor/qt.py

@ -125,7 +125,7 @@ class QtHandler(QtHandlerBase):
self.done.wait()
data = self.matrix_dialog.data
if data == 'x':
self.close_matrix_dialog_signal.emit()
self.close_matrix_dialog()
return data
def _close_matrix_dialog(self):
@ -133,6 +133,9 @@ class QtHandler(QtHandlerBase):
self.matrix_dialog.accept()
self.matrix_dialog = None
def close_matrix_dialog(self):
self.close_matrix_dialog_signal.emit()
def pin_dialog(self, msg):
# Needed e.g. when resetting a device
self.clear_dialog()

2
plugins/trezor/trezor.py

@ -250,7 +250,7 @@ class TrezorPlugin(HW_PluginBase):
pin_protection, label, language,
type=recovery_type_trezor)
if recovery_type == RECOVERY_TYPE_MATRIX:
handler.close_matrix_dialog_signal.emit()
handler.close_matrix_dialog()
elif method == TIM_MNEMONIC:
pin = pin_protection # It's the pin, not a boolean
client.load_device_by_mnemonic(str(item), pin,

Loading…
Cancel
Save