From 016c8b5f4cd693c2b954d4632a2b0aff63c557d6 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Sat, 11 Apr 2026 02:55:54 +0000 Subject: [PATCH] bip21: add comment listing URI scheme handler registrations It is sufficiently rare that we have to touch this stuff that I always have to re-discover where/how it is done. And it is impractical to grep for "bitcoin:" or "lightning:". Putting this "master list" comment very close to the BITCOIN_BIP21_URI_SCHEME variable seems like a good spot - at least this is where I would look for it first. --- electrum/bip21.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/electrum/bip21.py b/electrum/bip21.py index 7004eb0b3..c7f3ecfa3 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