diff --git a/src/state/ClipboardManager.ts b/src/state/ClipboardManager.ts index 1fe19f313..70db6e113 100644 --- a/src/state/ClipboardManager.ts +++ b/src/state/ClipboardManager.ts @@ -61,6 +61,7 @@ export const clipboardManager: IClipboardManagerModel = { return; } text = text.toLowerCase(); + // TODO remove lightning: log.i("try", [text]); actions.addToInvoiceCache(text); @@ -71,14 +72,14 @@ export const clipboardManager: IClipboardManagerModel = { actions.tryInvoice({ paymentRequest: text }); } // If this is a non-bech32 LNURL (LUD-17) - else if (text.includes("lnurlp:") || text.includes("lnurlw:") || text.includes("lnurlc:")) { + else if (text.includes("lnurlp://") || text.includes("lnurlw://") || text.includes("lnurlc://")) { log.d("lnurl non-bech32"); - text = "https://" + text.substring(7).split(/[\s&]/)[0]; + text = "https://" + text.substring(9).split(/[\s&]/)[0]; actions.tryLNUrl({ url: text }); } - else if (text.includes("keyauth:")) { + else if (text.includes("keyauth://")) { log.d("lnurl non-bech32 keyauth"); - text = "https://" + text.substring(8).split(/[\s&]/)[0]; + text = "https://" + text.substring(10).split(/[\s&]/)[0]; actions.tryLNUrl({ url: text }); } // If this is an LNURL diff --git a/src/state/DeeplinkManager.ts b/src/state/DeeplinkManager.ts index 03967d3e3..9d3836790 100644 --- a/src/state/DeeplinkManager.ts +++ b/src/state/DeeplinkManager.ts @@ -87,12 +87,12 @@ export const deeplinkManager: IDeeplinkManager = { return await actions.tryInvoice({ paymentRequest: subject.split("?")[0] }); } // If this is a non-bech32 LNURL (LUD-17) - else if (subject.startsWith("lnurlp") || subject.startsWith("lnurlw") || subject.startsWith("lnurlc")) { - subject = "https://" + subject.substring(7); + else if (subject.startsWith("lnurlp://") || subject.startsWith("lnurlw://") || subject.startsWith("lnurlc://")) { + subject = "https://" + subject.substring(9); return await actions.tryLNUrl({ url: subject.split("?")[0] }); } - else if (subject.startsWith("keyauth")) { - subject = "https://" + subject.substring(8); + else if (subject.startsWith("keyauth://")) { + subject = "https://" + subject.substring(10); return await actions.tryLNUrl({ url: subject.split("?")[0] }); } // If this is an LNURL