tkivy: nicer message on send success - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit f5083b46dea25a8c35ca52c8fd1b152d854a4fc3 DIR parent 2d8df85aab780f6ceecf64701ae41c836fca4052 HTML Author: ThomasV <thomasv@electrum.org> Date: Mon, 13 Mar 2017 11:32:55 +0100 kivy: nicer message on send success Diffstat: M gui/kivy/main_window.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) --- DIR diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py t@@ -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'))