What changed, and why it matters
This is a small user-interface fix, not a security change. It lets users click the balance pie chart in Electrum's main window to read an active warning message even when their wallet balance is zero. Previously, the click was ignored if the balance was zero, so a warning icon could be visible but not openable. The change adds a helper property to check whether a warning exists and opens the dialog when a warning is present.
No security action needed. Treat as a normal UI/usability fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies the Qt GUI. In balance_dialog.py it adds a read-only has_warning property exposing the existing _warning boolean. In main_window.py it changes show_balance_dialog() so it returns early only when balance == 0 and not self.balance_label.has_warning; if a warning is active, the BalanceDialog is opened regardless of zero balance. This is purely a UX/accessibility fix for viewing warning text.
Changed components
electrum/gui/qt/balance_dialog.pyelectrum/gui/qt/main_window.pyInspect captured patch +5 / −1
diff --git a/electrum/gui/qt/balance_dialog.py b/electrum/gui/qt/balance_dialog.py
index f3aa118..e2b18fc 100644
--- a/electrum/gui/qt/balance_dialog.py
+++ b/electrum/gui/qt/balance_dialog.py
@@ -105,6 +105,10 @@ class BalanceToolButton(QToolButton, PieChartObject):
self._update_size()
self._warning = False
+ @property
+ def has_warning(self) -> bool:
+ return bool(self._warning)
+
def update_list(self, l, warning: bool):
self._warning = warning
self._list = l
diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py
index ab69949..add3601 100644
--- a/electrum/gui/qt/main_window.py
+++ b/electrum/gui/qt/main_window.py
@@ -1804,7 +1804,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener):
def show_balance_dialog(self):
balance = self.wallet.get_balances_for_piechart().total()
- if balance == 0:
+ if balance == 0 and not self.balance_label.has_warning:
return
from .balance_dialog import BalanceDialog
d = BalanceDialog(self, wallet=self.wallet)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.