From d3f696c301a390bdcb936a8eb4b60be250492f8b Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Thu, 23 Apr 2015 09:17:46 +0300 Subject: [PATCH 1/2] main_window: call pr.get_id() before it's required --- gui/qt/main_window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index 617bd1ed..ecab9949 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -1147,7 +1147,6 @@ class ElectrumWindow(QMainWindow): def broadcast_thread(): # non-GUI thread pr = self.payment_request - key = pr.get_id() if pr is None: return self.wallet.sendtx(tx) if pr.has_expired(): @@ -1156,6 +1155,7 @@ class ElectrumWindow(QMainWindow): status, msg = self.wallet.sendtx(tx) if not status: return False, msg + key = pr.get_id() self.invoices.set_paid(key, tx.hash()) self.payment_request = None refund_address = self.wallet.addresses()[0] From b5c31cd031eb6aca3e7eee5dbf4772e6b80865cb Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Thu, 23 Apr 2015 09:30:25 +0300 Subject: [PATCH 2/2] transaction_dialog: hide broadcast button when offline --- gui/qt/transaction_dialog.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/qt/transaction_dialog.py b/gui/qt/transaction_dialog.py index f90fdb0a..af76b05b 100644 --- a/gui/qt/transaction_dialog.py +++ b/gui/qt/transaction_dialog.py @@ -178,6 +178,7 @@ class TxDialog(QDialog): # if we are not synchronized, we cannot tell if self.parent.network is None or not self.parent.network.is_running() or not self.parent.network.is_connected(): + self.broadcast_button.hide() # cannot broadcast when offline return if not self.wallet.up_to_date: return