Browse Source

qt: update whole gui on every LN payment

inefficient... but at least kept updated.
dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
SomberNight 6 years ago
committed by ThomasV
parent
commit
7644c84e07
  1. 8
      electrum/gui/qt/main_window.py

8
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}")

Loading…
Cancel
Save