electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 7644c84e07e03a1d7a92f2f28a6f8366b91c5696
parent 021f5d570ed8388f7d85f80172dfa7a6137600db
Author: SomberNight <somber.night@protonmail.com>
Date:   Tue, 26 Feb 2019 17:30:53 +0100

qt: update whole gui on every LN payment

inefficient... but at least kept updated.

Diffstat:
Melectrum/gui/qt/main_window.py | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py @@ -224,7 +224,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): interests = ['wallet_updated', 'network_updated', 'blockchain_updated', 'new_transaction', 'status', 'banner', 'verified', 'fee', 'fee_histogram', 'on_quotes', - 'on_history', 'channel', 'channels', 'ln_status', 'ln_message'] + 'on_history', 'channel', 'channels', 'ln_status', 'ln_message', + 'ln_payment_completed'] # To avoid leaking references to "self" that prevent the # window from being GC-ed when closed, callbacks should be # methods of this class only, and specifically not be @@ -375,6 +376,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): self.update_status() elif event == 'ln_status': self.need_update_ln.set() + elif event == 'ln_payment_completed': + # FIXME it is really inefficient to force update the whole GUI + # just for a single LN payment. individual rows in lists should be updated instead. + # consider: history tab, invoice list, request list + self.need_update.set() else: self.logger.info(f"unexpected network message: {event} {args}")