Skip to content

Commit

Permalink
DROPME: Throw in some to_lowercases to make CI pass
Browse files Browse the repository at this point in the history
We should drop this commit once
lightningdevkit/rust-lightning#3505 got in.
  • Loading branch information
tnull committed Jan 6, 2025
1 parent c8cdbcf commit ef4caef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/payment/unified_qr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,10 @@ impl<'a> bip21::de::DeserializationState<'a> for DeserializationState {
"lno" => {
let bolt12_value =
String::try_from(value).map_err(|_| Error::UriParameterParsingFailed)?;
let offer =
bolt12_value.parse::<Offer>().map_err(|_| Error::UriParameterParsingFailed)?;
let offer = bolt12_value
.to_lowercase()
.parse::<Offer>()
.map_err(|_| Error::UriParameterParsingFailed)?;
self.bolt12_offer = Some(offer);
Ok(bip21::de::ParamKind::Known)
},
Expand Down Expand Up @@ -342,7 +344,7 @@ mod tests {
}

if let Some(offer) = parsed_uri_with_offer.extras.bolt12_offer {
assert_eq!(offer, Offer::from_str(expected_bolt12_offer_2).unwrap());
assert_eq!(offer, Offer::from_str(&expected_bolt12_offer_2.to_lowercase()).unwrap());
} else {
panic!("No offer found.");
}
Expand Down

0 comments on commit ef4caef

Please sign in to comment.