Skip to content

Commit 22d767a

Browse files
committed
f Account for new PaymentKind variants and offer_id
1 parent 0286fc6 commit 22d767a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/integration_tests_rust.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,10 @@ fn simple_bolt12_send_receive() {
411411
let node_a_payments = node_a.list_payments();
412412
assert_eq!(node_a_payments.len(), 1);
413413
match node_a_payments.first().unwrap().kind {
414-
PaymentKind::Bolt12 { hash, preimage, secret: _ } => {
414+
PaymentKind::Bolt12Offer { hash, preimage, secret: _, offer_id } => {
415415
assert!(hash.is_some());
416416
assert!(preimage.is_some());
417+
assert_eq!(offer_id, offer.id());
417418
//TODO: We should eventually set and assert the secret sender-side, too, but the BOLT12
418419
//API currently doesn't allow to do that.
419420
},
@@ -426,10 +427,11 @@ fn simple_bolt12_send_receive() {
426427
let node_b_payments = node_b.list_payments();
427428
assert_eq!(node_b_payments.len(), 1);
428429
match node_b_payments.first().unwrap().kind {
429-
PaymentKind::Bolt12 { hash, preimage, secret } => {
430+
PaymentKind::Bolt12Offer { hash, preimage, secret, offer_id } => {
430431
assert!(hash.is_some());
431432
assert!(preimage.is_some());
432433
assert!(secret.is_some());
434+
assert_eq!(offer_id, offer.id());
433435
},
434436
_ => {
435437
panic!("Unexpected payment kind");

0 commit comments

Comments
 (0)