1
0

Ledger: handler belongs on wallet

Move closer to trezor sanity
This commit is contained in:
Neil Booth
2016-01-11 14:38:45 +09:00
parent 1ec3ad59cc
commit deccca1827
2 changed files with 21 additions and 18 deletions

View File

@@ -1,4 +1,5 @@
from PyQt4.Qt import QDialog, QInputDialog, QLineEdit, QVBoxLayout, QLabel, SIGNAL
from PyQt4.Qt import (QDialog, QInputDialog, QLineEdit,
QVBoxLayout, QLabel, SIGNAL)
import PyQt4.QtCore as QtCore
import threading
@@ -12,8 +13,7 @@ class Plugin(LedgerPlugin):
def load_wallet(self, wallet, window):
if type(wallet) != BTChipWallet:
return
if self.handler is None:
self.handler = BTChipQTHandler(window)
wallet.handler = BTChipQTHandler(window)
if self.btchip_is_connected(wallet):
if not wallet.check_proper_device():
window.show_error(_("This wallet does not match your Ledger device"))
@@ -24,7 +24,7 @@ class Plugin(LedgerPlugin):
def on_create_wallet(self, wallet, wizard):
assert type(wallet) == self.wallet_class
self.handler = BTChipQTHandler(wizard)
wallet.handler = BTChipQTHandler(wizard)
# self.select_device(wallet)
wallet.create_hd_account(None)