@@ -22,6 +22,7 @@ use crate::ln::onion_utils;
2222use crate :: ln:: onion_utils:: { DecodedOnionFailure , HTLCFailReason } ;
2323use crate :: offers:: invoice:: Bolt12Invoice ;
2424use crate :: offers:: invoice_request:: InvoiceRequest ;
25+ use crate :: offers:: static_invoice:: StaticInvoice ;
2526use crate :: offers:: nonce:: Nonce ;
2627use crate :: routing:: router:: { BlindedTail , InFlightHtlcs , Path , PaymentParameters , Route , RouteParameters , RouteParametersConfig , Router } ;
2728use crate :: sign:: { EntropySource , NodeSigner , Recipient } ;
@@ -156,9 +157,9 @@ impl_writeable_tlv_based!(RetryableInvoiceRequest, {
156157} ) ;
157158
158159impl 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