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():
|
def broadcast_thread():
|
||||||
# non-GUI thread
|
# non-GUI thread
|
||||||
pr = self.payment_request
|
pr = self.payment_request
|
||||||
key = pr.get_id()
|
|
||||||
if pr is None:
|
if pr is None:
|
||||||
return self.wallet.sendtx(tx)
|
return self.wallet.sendtx(tx)
|
||||||
if pr.has_expired():
|
if pr.has_expired():
|
||||||
|
@ -1172,6 +1171,7 @@ class ElectrumWindow(QMainWindow):
|
||||||
status, msg = self.wallet.sendtx(tx)
|
status, msg = self.wallet.sendtx(tx)
|
||||||
if not status:
|
if not status:
|
||||||
return False, msg
|
return False, msg
|
||||||
|
key = pr.get_id()
|
||||||
self.invoices.set_paid(key, tx.hash())
|
self.invoices.set_paid(key, tx.hash())
|
||||||
self.payment_request = None
|
self.payment_request = None
|
||||||
refund_address = self.wallet.addresses()[0]
|
refund_address = self.wallet.addresses()[0]
|
||||||
|
|
|
@ -178,6 +178,7 @@ class TxDialog(QDialog):
|
||||||
|
|
||||||
# if we are not synchronized, we cannot tell
|
# 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():
|
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
|
return
|
||||||
if not self.wallet.up_to_date:
|
if not self.wallet.up_to_date:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue