Skip to content

Commit 092632a

Browse files
committed
f - remove build_with_id from tests
1 parent 1b0dc45 commit 092632a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lightning/src/ln/offers_tests.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,12 @@ fn creates_and_pays_for_offer_using_two_hop_blinded_path() {
375375
disconnect_peers(alice, &[charlie, david, &nodes[4], &nodes[5]]);
376376
disconnect_peers(david, &[bob, &nodes[4], &nodes[5]]);
377377

378-
let (offer_id, offer) = alice.node
378+
let offer = alice.node
379379
.create_offer_builder("coffee".to_string())
380380
.unwrap()
381381
.amount_msats(10_000_000)
382-
.build_with_id().unwrap();
383-
let payment_context = PaymentContext::Bolt12Offer { offer_id };
382+
.build().unwrap();
383+
let payment_context = PaymentContext::Bolt12Offer { offer_id: offer.id() };
384384
assert_ne!(offer.signing_pubkey(), alice_id);
385385
assert!(!offer.paths().is_empty());
386386
for path in offer.paths() {
@@ -528,11 +528,11 @@ fn creates_and_pays_for_offer_using_one_hop_blinded_path() {
528528
let bob = &nodes[1];
529529
let bob_id = bob.node.get_our_node_id();
530530

531-
let (offer_id, offer) = alice.node
531+
let offer = alice.node
532532
.create_offer_builder("coffee".to_string()).unwrap()
533533
.amount_msats(10_000_000)
534-
.build_with_id().unwrap();
535-
let payment_context = PaymentContext::Bolt12Offer { offer_id };
534+
.build().unwrap();
535+
let payment_context = PaymentContext::Bolt12Offer { offer_id: offer.id() };
536536
assert_ne!(offer.signing_pubkey(), alice_id);
537537
assert!(!offer.paths().is_empty());
538538
for path in offer.paths() {
@@ -643,12 +643,12 @@ fn pays_for_offer_without_blinded_paths() {
643643
let bob = &nodes[1];
644644
let bob_id = bob.node.get_our_node_id();
645645

646-
let (offer_id, offer) = alice.node
646+
let offer = alice.node
647647
.create_offer_builder("coffee".to_string()).unwrap()
648648
.clear_paths()
649649
.amount_msats(10_000_000)
650-
.build_with_id().unwrap();
651-
let payment_context = PaymentContext::Bolt12Offer { offer_id };
650+
.build().unwrap();
651+
let payment_context = PaymentContext::Bolt12Offer { offer_id: offer.id() };
652652
assert_eq!(offer.signing_pubkey(), alice_id);
653653
assert!(offer.paths().is_empty());
654654

0 commit comments

Comments
 (0)