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 13, 2025
1 parent 0d18f90 commit 4e31967
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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
2 changes: 1 addition & 1 deletion tests/integration_tests_rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ fn unified_qr_send_receive() {
let expiry_sec = 4_000;

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

0 comments on commit 4e31967

Please sign in to comment.