Browse Source

kivy: nicer message on send success

283
ThomasV 8 years ago
parent
commit
f5083b46de
  1. 17
      gui/kivy/main_window.py

17
gui/kivy/main_window.py

@ -727,12 +727,17 @@ class ElectrumWindow(App):
Clock.schedule_once(lambda dt: on_complete(ok, txid)) Clock.schedule_once(lambda dt: on_complete(ok, txid))
def broadcast(self, tx, pr=None): def broadcast(self, tx, pr=None):
def on_complete(ok, txid): def on_complete(ok, msg):
self.show_info(txid) if ok:
if ok and pr: self.show_info(_('Payment sent.'))
pr.set_paid(tx.hash()) if self.send_screen:
self.wallet.invoices.save() self.send_screen.do_clear()
self.update_tab('invoices') if pr:
pr.set_paid(tx.txid())
self.wallet.invoices.save()
self.update_tab('invoices')
else:
self.show_error(msg)
if self.network and self.network.is_connected(): if self.network and self.network.is_connected():
self.show_info(_('Sending')) self.show_info(_('Sending'))

Loading…
Cancel
Save