electrum

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

commit d9db7771f993002f7cae07cb4c7951e4843218f7
parent 26d133c20aacabe895f51abe45f02960bf74fce1
Author: ThomasV <thomasv@gitorious>
Date:   Thu,  5 Jun 2014 17:55:27 +0200

tx window: let prent do the broadcast

Diffstat:
Mgui/qt/main_window.py | 11+++++------
Mgui/qt/transaction_dialog.py | 11++---------
2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -843,12 +843,11 @@ class ElectrumWindow(QMainWindow): if label: self.wallet.set_label(tx.hash(), label) - if not self.gui_object.payment_request: - if not tx.is_complete() or self.config.get('show_before_broadcast'): - self.show_transaction(tx) - self.do_clear() - self.send_button.setDisabled(False) - return + if not tx.is_complete() or self.config.get('show_before_broadcast'): + self.show_transaction(tx) + self.do_clear() + self.send_button.setDisabled(False) + return self.broadcast_transaction(tx) diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py @@ -80,7 +80,8 @@ class TxDialog(QDialog): buttons.addWidget(b) self.broadcast_button = b = QPushButton(_("Broadcast")) - b.clicked.connect(self.broadcast) + b.clicked.connect(lambda: self.parent.broadcast_transaction(self.tx)) + b.hide() buttons.addWidget(b) @@ -214,14 +215,6 @@ class TxDialog(QDialog): - - def broadcast(self): - result, result_message = self.wallet.sendtx( self.tx ) - if result: - self.show_message(_("Transaction successfully sent")+': %s' % (result_message)) - else: - self.show_message(_("There was a problem sending your transaction:") + '\n %s' % (result_message)) - def show_message(self, msg): QMessageBox.information(self, _('Message'), msg, _('OK'))