bip21: add comment listing URI scheme handler registrations
What changed, and why it matters
This commit only adds a plain-code comment listing where Electrum registers 'bitcoin:' and 'lightning:' URI scheme handlers across different operating systems. No code behavior changes, no security fix or vulnerability introduced.
No action required; the change is documentation-only.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff inserts a six-line comment in electrum/bip21.py near the URI scheme constants. It documents Android (contrib/android/bitcoin_intent.xml), Linux Desktop (electrum.desktop), Windows installer (contrib/build-wine/electrum.nsi), and macOS (contrib/osx/pyinstaller.spec) handler registrations. There are no functional modifications.
Changed components
electrum/bip21.pyInspect captured patch +6 / −0
diff --git a/electrum/bip21.py b/electrum/bip21.py
index 7004eb0..c7f3ecf 100644
--- a/electrum/bip21.py
+++ b/electrum/bip21.py
@@ -13,6 +13,12 @@ from .lnaddr import lndecode, LnDecodeException
BITCOIN_BIP21_URI_SCHEME = 'bitcoin'
LIGHTNING_URI_SCHEME = 'lightning'
+# note: URI scheme handler registrations are duplicated all over the codebase:
+# - for Android: contrib/android/bitcoin_intent.xml
+# - for Linux Desktop: electrum.desktop
+# - for Windows (setup.exe): contrib/build-wine/electrum.nsi
+# - for macOS: contrib/osx/pyinstaller.spec
+
class InvalidBitcoinURI(Exception):
pass
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.