From ef4caef8124b301d76ec690dd3c98e2fad9da8bc Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Mon, 6 Jan 2025 10:59:56 +0100 Subject: [PATCH] DROPME: Throw in some `to_lowercases` to make CI pass We should drop this commit once https://github.com/lightningdevkit/rust-lightning/pull/3505 got in. --- src/payment/unified_qr.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/payment/unified_qr.rs b/src/payment/unified_qr.rs index 029416b84..e6e2a2e73 100644 --- a/src/payment/unified_qr.rs +++ b/src/payment/unified_qr.rs @@ -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::().map_err(|_| Error::UriParameterParsingFailed)?; + let offer = bolt12_value + .to_lowercase() + .parse::() + .map_err(|_| Error::UriParameterParsingFailed)?; self.bolt12_offer = Some(offer); Ok(bip21::de::ParamKind::Known) }, @@ -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."); }