Merge pull request #1151 from romanz/master
Fix transaction broadcasting issues
This commit is contained in:
commit
de5c9c2f83
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue