Skip to content

Commit 9e6f612

Browse files
fixup! add the bolt12 invoice to the PaymentSend event
Signed-off-by: Vincenzo Palazzo <[email protected]>
1 parent 506a2bc commit 9e6f612

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lightning/src/ln/async_payments_tests.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::blinded_path::message::{MessageContext, OffersContext};
1111
use crate::blinded_path::payment::PaymentContext;
1212
use crate::blinded_path::payment::{AsyncBolt12OfferContext, BlindedPaymentTlvs};
1313
use crate::chain::channelmonitor::{HTLC_FAIL_BACK_BUFFER, LATENCY_GRACE_PERIOD_BLOCKS};
14-
use crate::events::{Event, HTLCDestination, PaymentFailureReason};
14+
use crate::events::{Event, HTLCDestination, PaymentFailureReason, PaidInvoice};
1515
use crate::ln::blinded_payment_tests::{fail_blinded_htlc_backwards, get_blinded_route_parameters};
1616
use crate::ln::channelmanager::{PaymentId, RecipientOnionFields};
1717
use crate::ln::functional_test_utils::*;
@@ -420,7 +420,7 @@ fn async_receive_flow_success() {
420420
.pay_for_offer(&offer, None, Some(amt_msat), None, payment_id, Retry::Attempts(0), params)
421421
.unwrap();
422422
let release_held_htlc_om =
423-
pass_async_payments_oms(static_invoice, &nodes[0], &nodes[1], &nodes[2]).1;
423+
pass_async_payments_oms(static_invoice.clone(), &nodes[0], &nodes[1], &nodes[2]).1;
424424
nodes[0]
425425
.onion_messenger
426426
.handle_onion_message(nodes[2].node.get_our_node_id(), &release_held_htlc_om);
@@ -441,7 +441,9 @@ fn async_receive_flow_success() {
441441
let args = PassAlongPathArgs::new(&nodes[0], route[0], amt_msat, payment_hash, ev)
442442
.with_payment_preimage(keysend_preimage);
443443
do_pass_along_path(args);
444-
claim_payment_along_route(ClaimAlongRouteArgs::new(&nodes[0], route, keysend_preimage));
444+
let res = claim_payment_along_route(ClaimAlongRouteArgs::new(&nodes[0], route, keysend_preimage));
445+
assert!(res.is_some());
446+
assert_eq!(res, Some(PaidInvoice::StaticInvoice(static_invoice)));
445447
}
446448

447449
#[cfg_attr(feature = "std", ignore)]

0 commit comments

Comments
 (0)