electrum

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

commit 23c8684448f59af48581549b5442ff0f4c50d0ae
parent c0fc84439021ebdb39dba7407a9ad66f57e043ce
Author: ThomasV <thomasv@electrum.org>
Date:   Sat, 22 Oct 2016 00:32:19 +0200

qt: show both sign and broadcast buttons in tx dialog

Diffstat:
Mgui/qt/transaction_dialog.py | 19++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py @@ -156,13 +156,12 @@ class TxDialog(QDialog, MessageBoxMixin): if success: self.prompt_if_unsaved = True self.saved = False - self.update() + self.update() + self.main_window.pop_top_level_window(self) self.sign_button.setDisabled(True) self.main_window.push_top_level_window(self) self.main_window.sign_tx(self.tx, sign_done) - self.sign_button.setDisabled(False) - self.main_window.pop_top_level_window(self) def save(self): name = 'signed_%s.txn' % (self.tx.hash()[0:8]) if self.tx.is_complete() else 'unsigned.txn' @@ -173,23 +172,13 @@ class TxDialog(QDialog, MessageBoxMixin): self.show_message(_("Transaction saved successfully")) self.saved = True - def update(self): desc = self.desc base_unit = self.main_window.base_unit() format_amount = self.main_window.format_amount tx_hash, status, label, can_broadcast, can_rbf, amount, fee, height, conf, timestamp, exp_n = self.wallet.get_tx_info(self.tx) - - if can_broadcast: - self.broadcast_button.show() - else: - self.broadcast_button.hide() - - if self.wallet.can_sign(self.tx): - self.sign_button.show() - else: - self.sign_button.hide() - + self.broadcast_button.setEnabled(can_broadcast) + self.sign_button.setEnabled(self.wallet.can_sign(self.tx)) self.tx_hash_e.setText(tx_hash or _('Unknown')) if desc is None: self.tx_desc.hide()