Skip to content

Commit

Permalink
Merge pull request #1003 from andrei-21/feature/support-upcase
Browse files Browse the repository at this point in the history
Support uppercased `LIGHTNING` parameter of LUD-01 fallback scheme
  • Loading branch information
roeierez authored Jun 12, 2024
2 parents 6188f46 + 15ab241 commit ffb9878
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 ffb9878

Please sign in to comment.