electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit d70ad3df93cc2d6dfdb1c099f3baf86a68c9402c
parent ffd081ac2157138533abd1110dd2cacb9c18ddf4
Author: Neil Booth <kyuupichan@gmail.com>
Date:   Wed, 23 Dec 2015 22:21:29 +0900

Better waiting dialog for trustedcoin

Diffstat:
Mplugins/trustedcoin/qt.py | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/plugins/trustedcoin/qt.py b/plugins/trustedcoin/qt.py @@ -85,15 +85,18 @@ class Plugin(TrustedCoinPlugin): self.print_error("twofactor: xpub3 not needed") window.wallet.auth_code = auth_code + def waiting_dialog(self, window, on_success=None): + task = partial(self.request_billing_info, window.wallet) + return WaitingDialog(window, 'Getting billing information...', task, + on_success=on_success) + @hook def abort_send(self, window): wallet = window.wallet if type(wallet) is Wallet_2fa and not wallet.can_sign_without_server(): if wallet.billing_info is None: # request billing info before forming the transaction - task = partial(self.request_billing_info, wallet) - dialog = WaitingDialog(window, 'please wait...', task) - dialog.wait() + waiting_dialog(self, window).wait() if wallet.billing_info is None: window.show_message('Could not contact server') return True @@ -101,9 +104,8 @@ class Plugin(TrustedCoinPlugin): def settings_dialog(self, window): - task = partial(self.request_billing_info, window.wallet) - WaitingDialog(window, 'please wait...', task, - on_success=partial(self.show_settings_dialog, window)) + on_success = partial(self.show_settings_dialog, window) + self.waiting_dialog(window, on_success) def show_settings_dialog(self, window, success): if not success: