Skip to content

Commit

Permalink
Merge pull request #1087 from getlipa/feature/lower-case-lightning-pr…
Browse files Browse the repository at this point in the history
…efix

Lower case lightning prefix in `decode_data`
  • Loading branch information
danielgranhao authored May 24, 2024
2 parents 86d3a14 + 628437a commit 5c433fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,9 @@ impl LightningNode {
///
/// Requires network: **yes**
pub fn decode_data(&self, data: String) -> std::result::Result<DecodedData, DecodeDataError> {
// TODO: remove the following workaround when Breez SDK supports capitalized lightning prefix
let data = data.replacen("LIGHTNING:", "lightning:", 1);

match self.rt.handle().block_on(parse(&data)) {
Ok(InputType::Bolt11 { invoice }) => {
ensure!(
Expand Down

0 comments on commit 5c433fe

Please sign in to comment.