Skip to content

Commit ef4caef

Browse files
committed
DROPME: Throw in some to_lowercases to make CI pass
We should drop this commit once lightningdevkit/rust-lightning#3505 got in.
1 parent c8cdbcf commit ef4caef

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/payment/unified_qr.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,10 @@ impl<'a> bip21::de::DeserializationState<'a> for DeserializationState {
265265
"lno" => {
266266
let bolt12_value =
267267
String::try_from(value).map_err(|_| Error::UriParameterParsingFailed)?;
268-
let offer =
269-
bolt12_value.parse::<Offer>().map_err(|_| Error::UriParameterParsingFailed)?;
268+
let offer = bolt12_value
269+
.to_lowercase()
270+
.parse::<Offer>()
271+
.map_err(|_| Error::UriParameterParsingFailed)?;
270272
self.bolt12_offer = Some(offer);
271273
Ok(bip21::de::ParamKind::Known)
272274
},
@@ -342,7 +344,7 @@ mod tests {
342344
}
343345

344346
if let Some(offer) = parsed_uri_with_offer.extras.bolt12_offer {
345-
assert_eq!(offer, Offer::from_str(expected_bolt12_offer_2).unwrap());
347+
assert_eq!(offer, Offer::from_str(&expected_bolt12_offer_2.to_lowercase()).unwrap());
346348
} else {
347349
panic!("No offer found.");
348350
}

0 commit comments

Comments
 (0)