1
0

network: change broadcast_transaction api

raise exceptions instead of weird return values
closes #4433
This commit is contained in:
SomberNight
2018-10-10 15:56:41 +02:00
parent c7833b8bc0
commit 87b05e1c9e
5 changed files with 27 additions and 27 deletions

View File

@@ -367,16 +367,14 @@ class ElectrumGui:
self.wallet.labels[tx.txid()] = self.str_description
self.show_message(_("Please wait..."), getchar=False)
status, msg = self.network.run_from_another_thread(
self.network.broadcast_transaction(tx))
if status:
try:
self.network.run_from_another_thread(self.network.broadcast_transaction(tx))
except Exception as e:
self.show_message(repr(e))
else:
self.show_message(_('Payment sent.'))
self.do_clear()
#self.update_contacts_tab()
else:
self.show_message(_('Error'))
def show_message(self, message, getchar = True):
w = self.w