tkivy: lnpay_thread - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit f8038d024b899d624326de71abbc60688e1339c8 DIR parent 9e78fdbf71dde6f3ac0dc83895c30e5535a68975 HTML Author: ThomasV <thomasv@electrum.org> Date: Thu, 8 Aug 2019 12:55:44 +0200 kivy: lnpay_thread Diffstat: M electrum/gui/kivy/uix/screens.py | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) --- DIR diff --git a/electrum/gui/kivy/uix/screens.py b/electrum/gui/kivy/uix/screens.py t@@ -3,6 +3,7 @@ from weakref import ref from decimal import Decimal import re import datetime +import threading import traceback, sys from enum import Enum, auto t@@ -299,6 +300,11 @@ class SendScreen(CScreen): return invoice = self.screen.address amount_sat = self.app.get_amount(self.screen.amount) + threading.Thread(target=self._lnpay_thread, args=(invoice, amount_sat)).start() + + def _lnpay_thread(self, invoice, amount_sat): + self.do_clear() + self.app.show_info(_('Payment in progress..')) try: success = self.app.wallet.lnworker.pay(invoice, attempts=10, amount_sat=amount_sat, timeout=60) except PaymentFailure as e: