From 15ab241c030f1c1496de6f5964a26e947a9681fc Mon Sep 17 00:00:00 2001 From: Andrei Date: Wed, 12 Jun 2024 00:00:00 +0000 Subject: [PATCH] Support uppercased `LIGHTNING` parameter of LUD-01 fallback scheme --- libs/sdk-core/src/input_parser.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/sdk-core/src/input_parser.rs b/libs/sdk-core/src/input_parser.rs index 000963306..272c98e70 100644 --- a/libs/sdk-core/src/input_parser.rs +++ b/libs/sdk-core/src/input_parser.rs @@ -207,7 +207,10 @@ pub async fn parse(input: &str) -> Result { if let Ok(url) = reqwest::Url::parse(input) { if ["http", "https"].contains(&url.scheme()) { - if let Some((_key, value)) = url.query_pairs().find(|p| p.0 == "lightning") { + if let Some((_key, value)) = url + .query_pairs() + .find(|p| p.0 == "lightning" || p.0 == "LIGHTNING") + { if let Ok((domain, lnurl_endpoint, ln_address)) = lnurl_decode(&value) { return resolve_lnurl(domain, lnurl_endpoint, ln_address).await; }