Skip to content

Commit 18f60e5

Browse files
fixup! add the bolt12 invoice to the PaymentSend event
Signed-off-by: Vincenzo Palazzo <[email protected]>
1 parent 141c33e commit 18f60e5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lightning/src/ln/outbound_payment.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use crate::ln::onion_utils;
2222
use crate::ln::onion_utils::{DecodedOnionFailure, HTLCFailReason};
2323
use crate::offers::invoice::Bolt12Invoice;
2424
use crate::offers::invoice_request::InvoiceRequest;
25+
use crate::offers::static_invoice::StaticInvoice;
2526
use crate::offers::nonce::Nonce;
2627
use crate::routing::router::{BlindedTail, InFlightHtlcs, Path, PaymentParameters, Route, RouteParameters, RouteParametersConfig, Router};
2728
use crate::sign::{EntropySource, NodeSigner, Recipient};
@@ -156,9 +157,9 @@ impl_writeable_tlv_based!(RetryableInvoiceRequest, {
156157
});
157158

158159
impl PendingOutboundPayment {
159-
fn bolt12_invoice(&self) -> Option<PaidInvoice> {
160+
fn bolt12_invoice(&self) -> Option<&PaidInvoice> {
160161
match self {
161-
PendingOutboundPayment::Retryable { bolt12_invoice, .. } => bolt12_invoice.clone(),
162+
PendingOutboundPayment::Retryable { bolt12_invoice, .. } => bolt12_invoice.as_ref(),
162163
_ => None,
163164
}
164165
}
@@ -2028,7 +2029,7 @@ impl OutboundPayments {
20282029
payment_hash,
20292030
amount_msat,
20302031
fee_paid_msat,
2031-
bolt12_invoice: payment.get().bolt12_invoice(),
2032+
bolt12_invoice: payment.get().bolt12_invoice().cloned(),
20322033
}, Some(ev_completion_action.clone())));
20332034
payment.get_mut().mark_fulfilled();
20342035
}

0 commit comments

Comments
 (0)