tfix trustedcoin wizard. fixes #2276 - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit e43abb5c960f1be7c9463c66656d74916fb00bab DIR parent 9628619e682b183e1572b87f30d9ed25e6f9d44e HTML Author: ThomasV <thomasv@electrum.org> Date: Fri, 10 Mar 2017 14:16:46 +0100 fix trustedcoin wizard. fixes #2276 Diffstat: M plugins/trustedcoin/qt.py | 4 ++-- M plugins/trustedcoin/trustedcoin.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) --- DIR diff --git a/plugins/trustedcoin/qt.py b/plugins/trustedcoin/qt.py t@@ -232,7 +232,7 @@ class Plugin(TrustedCoinPlugin): email_e.textChanged.connect(set_enabled) email_e.setFocus(True) - window.set_main_layout(vbox, next_enabled=False) + window.exec_layout(vbox, next_enabled=False) next_button.setText(prior_button_text) return str(email_e.text()) t@@ -275,7 +275,7 @@ class Plugin(TrustedCoinPlugin): pw.textChanged.connect(set_enabled) cb_lost.toggled.connect(set_enabled) - window.set_main_layout(vbox, next_enabled=False, + window.exec_layout(vbox, next_enabled=False, raise_on_cancel=False) return pw.get_amount(), cb_lost.isChecked() DIR diff --git a/plugins/trustedcoin/trustedcoin.py b/plugins/trustedcoin/trustedcoin.py t@@ -377,11 +377,11 @@ class TrustedCoinPlugin(BasePlugin): xprv1, xpub1, xprv2, xpub2 = self.xkeys_from_seed(seed, passphrase) k1 = keystore.from_xprv(xprv1) k2 = keystore.from_xpub(xpub2) - wizard.request_password(run_next=lambda pw: self.on_password(wizard, pw, k1, k2)) + wizard.request_password(run_next=lambda pw, encrypt: self.on_password(wizard, pw, encrypt, k1, k2)) - def on_password(self, wizard, password, k1, k2): + def on_password(self, wizard, password, encrypt, k1, k2): k1.update_password(None, password) - wizard.storage.put('use_encryption', bool(password)) + wizard.storage.set_password(password, encrypt) wizard.storage.put('x1/', k1.dump()) wizard.storage.put('x2/', k2.dump()) wizard.storage.write() t@@ -424,12 +424,12 @@ class TrustedCoinPlugin(BasePlugin): def on_choice(self, wizard, seed, passphrase, x): if x == 'disable': - f = lambda pw: wizard.run('on_restore_pw', seed, passphrase, pw) + f = lambda pw, encrypt: wizard.run('on_restore_pw', seed, passphrase, pw, encrypt) wizard.request_password(run_next=f) else: self.create_keystore(wizard, seed, passphrase) - def on_restore_pw(self, wizard, seed, passphrase, password): + def on_restore_pw(self, wizard, seed, passphrase, password, encrypt): storage = wizard.storage xprv1, xpub1, xprv2, xpub2 = self.xkeys_from_seed(seed, passphrase) k1 = keystore.from_xprv(xprv1)