Merge pull request #11035 from f321x/fix_txeditor_crash
What changed, and why it matters
This is a small user-interface bug fix in Electrum's Qt desktop wallet. It changes how tabs are added and removed in the transaction editor dialog so that the 'Onchain Transaction' tab is not accidentally removed and re-added in a way that could crash the application. There is no indication this is a security vulnerability; it appears to be a stability/usability fix for a GUI crash.
Treat as a routine stability fix. No special security response is warranted. Users can update normally if they experience the crash.
Security signals we found
No security-relevant keywords in commit title or message
GUI-only change in transaction dialog tab management
Crash fix, not an exploit path
No input validation, parsing, or privilege changes
No vendor security disclosure or CVE referenced
Evidence from the diff
The patch modifies update_tab_visibility() in electrum/gui/qt/confirm_tx_dialog.py. Previously the method removed all tabs and then re-added the onchain tab. The new logic only adds the onchain tab if it is not already present, and specifically removes only the submarine-payment tab if present. This avoids a race/invalid-widget-state crash in the QTabWidget when the onchain tab is removed and immediately re-added. No cryptographic, networking, or wallet-core code is touched.
Changed components
electrum/gui/qt/confirm_tx_dialog.pyQt transaction editor dialogSubmarine payment tab visibilityInspect captured patch +5 / −5
### electrum/gui/qt/confirm_tx_dialog.py
@@ -307,12 +307,12 @@ def feerounding_onclick():
def update_tab_visibility(self):
"""Update self.tab_widget to show all tabs that are enabled."""
- # first remove all tabs
- while self.tab_widget.count() > 0:
- self.tab_widget.removeTab(0)
-
# always show onchain payment tab
- self.tab_widget.addTab(self.onchain_tab, _('Onchain Transaction'))
+ if self.tab_widget.indexOf(self.onchain_tab) == -1:
+ self.tab_widget.addTab(self.onchain_tab, _('Onchain Transaction'))
+
+ # will be re-added if enabled, no-op if not shown
+ self.tab_widget.removeTab(self.tab_widget.indexOf(self.submarine_payment_tab))
allow_swaps = self.context == TxEditorContext.PAYMENT and self.payee_outputs and self.swap_manager
if self.config.WALLET_ENABLE_SUBMARINE_PAYMENTS and allow_swaps:Why this scored 21/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.