qml: fix incorrect index when deleting wallet
What changed, and why it matters
This is a one-line bug fix in Electrum's mobile/QML wallet interface. When a user deleted a wallet from the list, the wrong row index was passed to Qt's list-removal machinery, so the wallet stayed in the list and the displayed list became corrupted. The fix uses the correct index. There is no direct security impact: it is a UI consistency bug, not a vulnerability that lets an attacker steal funds or run code.
Treat as a normal bug fix. No security response required. Users on affected builds may see stale wallet entries after deletion until they restart the app; updating is optional for this issue alone.
Security signals we found
No security-relevant keywords in commit title or message
No input validation, cryptography, networking, or privilege changes
UI model index mismatch only affects displayed wallet list state
No references to vulnerabilities, CVEs, or security researchers
Evidence from the diff
In electrum/gui/qml/qedaemon.py, QEWalletListModel.remove_wallet iterates wallets to find the target wallet and records its index in remove, but mistakenly called self.beginRemoveRows(QModelIndex(), i, i) using the loop variable i (which equals len(wallets) after the loop) instead of remove. This caused the model to signal removal of a non-existent row and leave the actual wallet entry in self._wallets, breaking the QML wallet list view after a delete. The patch changes the index to remove. No security boundary is crossed; the bug is purely presentational.
Changed components
electrum/gui/qml/qedaemon.pyQEWalletListModel.remove_walletQML wallet list UIInspect captured patch +1 / −1
diff --git a/electrum/gui/qml/qedaemon.py b/electrum/gui/qml/qedaemon.py
index 2b1bfa3..f76a8fb 100644
--- a/electrum/gui/qml/qedaemon.py
+++ b/electrum/gui/qml/qedaemon.py
@@ -98,7 +98,7 @@ class QEWalletListModel(QAbstractListModel):
i += 1
if remove >= 0:
- self.beginRemoveRows(QModelIndex(), i, i)
+ self.beginRemoveRows(QModelIndex(), remove, remove)
self._wallets = wallets
self.endRemoveRows()
Why this scored 16/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.