kivy: nicer message on send success

This commit is contained in:
ThomasV 2017-03-13 11:32:55 +01:00
parent 2d8df85aab
commit f5083b46de
1 changed files with 11 additions and 6 deletions

View File

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