From 9b4d4d61bb7b5c5e28f5d3c3e8f000008dc36d6c Mon Sep 17 00:00:00 2001 From: f321x Date: Thu, 5 Mar 2026 10:48:45 +0100 Subject: [PATCH] plugin: nwc: add update timer to connection list --- electrum/plugins/nwc/qt.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/electrum/plugins/nwc/qt.py b/electrum/plugins/nwc/qt.py index 1d2dcef92..8dc412b88 100644 --- a/electrum/plugins/nwc/qt.py +++ b/electrum/plugins/nwc/qt.py @@ -32,7 +32,7 @@ from PyQt6.QtWidgets import ( QTextEdit, QApplication, QSpinBox, QSizePolicy, QComboBox, QLineEdit, ) from PyQt6.QtGui import QPixmap, QImage -from PyQt6.QtCore import Qt +from PyQt6.QtCore import Qt, QTimer from electrum.i18n import _ from electrum.plugin import hook @@ -197,6 +197,11 @@ class Plugin(NWCServerPlugin): vbox.addLayout(footer_buttons) d.setLayout(main_layout) + # update the list from time to time to see if budgets have changed + refresh_timer = QTimer(d) + refresh_timer.timeout.connect(update_connections_list) + refresh_timer.start(5_000) # msec + return bool(d.exec()) def connection_info_input_dialog(self, window) -> Optional[str]: