Skip to content

Commit

Permalink
Support uppercased LIGHTNING parameter of LUD-01 fallback scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-21 committed Jun 12, 2024
1 parent 6188f46 commit 15ab241
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libs/sdk-core/src/input_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ pub async fn parse(input: &str) -> Result<InputType> {

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;
}
Expand Down

0 comments on commit 15ab241

Please sign in to comment.