Skip to content

Commit d89ad6c

Browse files
committed
f expose offer quantity as None in unifiedqr send
1 parent ea746c8 commit d89ad6c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/payment/unified_qr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl UnifiedQrPayment {
136136
uri.clone().require_network(self.config.network).map_err(|_| Error::InvalidNetwork)?;
137137

138138
if let Some(offer) = uri_network_checked.extras.bolt12_offer {
139-
match self.bolt12_payment.send(&offer, None) {
139+
match self.bolt12_payment.send(&offer, None, None) {
140140
Ok(payment_id) => return Ok(QrPaymentResult::Bolt12 { payment_id }),
141141
Err(e) => log_error!(self.logger, "Failed to send BOLT12 offer: {:?}. This is part of a unified QR code payment. Falling back to the BOLT11 invoice.", e),
142142
}

tests/integration_tests_rust.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ fn simple_bolt12_send_receive() {
425425

426426
let expected_amount_msat = 100_000_000;
427427
let offer = node_b.bolt12_payment().receive(expected_amount_msat, "asdf").unwrap();
428-
let payment_id = node_a.bolt12_payment().send(&offer, None).unwrap();
428+
let payment_id = node_a.bolt12_payment().send(&offer, None, None).unwrap();
429429

430430
expect_payment_successful_event!(node_a, Some(payment_id), None);
431431
let node_a_payments = node_a.list_payments();
@@ -523,7 +523,7 @@ fn simple_bolt12_send_receive() {
523523
let node_b_payments = node_b.list_payments_with_filter(|p| p.id == node_b_payment_id);
524524
assert_eq!(node_b_payments.len(), 1);
525525
match node_b_payments.first().unwrap().kind {
526-
PaymentKind::Bolt12Refund { hash, preimage, secret: _ , ..} => {
526+
PaymentKind::Bolt12Refund { hash, preimage, secret: _, .. } => {
527527
assert!(hash.is_some());
528528
assert!(preimage.is_some());
529529
//TODO: We should eventually set and assert the secret sender-side, too, but the BOLT12

0 commit comments

Comments
 (0)