diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index 7c383991..c14ab8ed 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -1163,7 +1163,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(): @@ -1172,6 +1171,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] 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