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

@@ -203,15 +203,14 @@ class ElectrumGui:
self.wallet.labels[tx.txid()] = self.str_description
print(_("Please wait..."))
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:
print(repr(e))
else:
print(_('Payment sent.'))
#self.do_clear()
#self.update_contacts_tab()
else:
print(_('Error'))
def network_dialog(self):
print("use 'electrum setconfig server/proxy' to change your network settings")