tkivy: show exception raised by lnworker.pay. fixes #6495 - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 6daf8b7534698b0903c4e7ed7fbb19de8743e42f (DIR) parent 89a14996ced2463379e3d7b252b48a852762cdc9 (HTM) Author: ThomasV <thomasv@electrum.org> Date: Sun, 20 Dec 2020 11:30:18 +0100 kivy: show exception raised by lnworker.pay. fixes #6495 Diffstat: M electrum/gui/kivy/uix/screens.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) --- (DIR) diff --git a/electrum/gui/kivy/uix/screens.py b/electrum/gui/kivy/uix/screens.py t@@ -360,14 +360,13 @@ class SendScreen(CScreen, Logger): do_pay(False) def _do_pay_lightning(self, invoice: LNInvoice, pw) -> None: + def pay_thread(): + try: + self.app.wallet.lnworker.pay(invoice.invoice, attempts=10) + except Exception as e: + self.app.show_error(repr(e)) self.save_invoice(invoice) - threading.Thread( - target=self.app.wallet.lnworker.pay, - args=(invoice.invoice,), - kwargs={ - 'attempts': 10, - }, - ).start() + threading.Thread(target=pay_thread).start() def _do_pay_onchain(self, invoice: OnchainInvoice, rbf: bool) -> None: # make unsigned transaction