From 1c63e515c1b116f12fc43aaa3436cca271ad4206 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Sun, 31 Dec 2023 00:36:51 +0100 Subject: [PATCH 1/2] fix: lnurl scheme parsing --- src/extension/inpage-script/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/extension/inpage-script/index.js b/src/extension/inpage-script/index.js index 30f5323154..09826965f5 100644 --- a/src/extension/inpage-script/index.js +++ b/src/extension/inpage-script/index.js @@ -45,10 +45,12 @@ function registerLightningLinkClickHandler() { return; } const lightningLink = target.closest('[href^="lightning:" i]'); - const lnurlLink = target.closest('[href^="lnurl" i]'); + const lnurlLink = target.closest( + '[href^="lnurlp:" i],[href^="lnurlw:" i],[href^="lnurlc:" i]' + ); const bitcoinLinkWithLighting = target.closest( '[href*="lightning=ln" i]' - ); // links with a lightning parameter and a value that starts with ln: payment requests (lnbc...) or lnurl (lnurl*) + ); // links with a lightning parameter and a value that starts with ln: payment requests (lnbc...) or lnurl (lnurl[pwc]:) let href; let paymentRequest; let lnurl; From 385af368f6ada974b0c78d0b60e779020af2e801 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Thu, 4 Jan 2024 12:38:20 +0100 Subject: [PATCH 2/2] fix: add missing link to LUD-17 --- src/extension/inpage-script/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/extension/inpage-script/index.js b/src/extension/inpage-script/index.js index 09826965f5..34935d42a5 100644 --- a/src/extension/inpage-script/index.js +++ b/src/extension/inpage-script/index.js @@ -44,6 +44,8 @@ function registerLightningLinkClickHandler() { if (!target || !target.closest) { return; } + // parse protocol schemes defined in LUD-17 + // https://github.com/lnurl/luds/blob/luds/17.md const lightningLink = target.closest('[href^="lightning:" i]'); const lnurlLink = target.closest( '[href^="lnurlp:" i],[href^="lnurlw:" i],[href^="lnurlc:" i]'