Skip to content

Commit d7eb1a1

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 0d18f90 commit d7eb1a1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/payment/unified_qr.rs

+5-3
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
}

tests/integration_tests_rust.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ fn unified_qr_send_receive() {
849849
let expiry_sec = 4_000;
850850

851851
let uqr_payment = node_b.unified_qr_payment().receive(expected_amount_sats, "asdf", expiry_sec);
852-
let uri_str = uqr_payment.clone().unwrap();
852+
let uri_str = uqr_payment.clone().unwrap().to_lowercase();
853853
let offer_payment_id: PaymentId = match node_a.unified_qr_payment().send(&uri_str) {
854854
Ok(QrPaymentResult::Bolt12 { payment_id }) => {
855855
println!("\nBolt12 payment sent successfully with PaymentID: {:?}", payment_id);

0 commit comments

Comments
 (0)