From f5083b46dea25a8c35ca52c8fd1b152d854a4fc3 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 13 Mar 2017 11:32:55 +0100 Subject: [PATCH] kivy: nicer message on send success --- gui/kivy/main_window.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py index 5defb352..cea6979b 100644 --- a/gui/kivy/main_window.py +++ b/gui/kivy/main_window.py @@ -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'))