@@ -65,7 +65,7 @@ use crate::ln::outbound_payment::{OutboundPayments, PaymentAttempts, PendingOutb
6565use crate::ln::wire::Encode;
6666use crate::offers::invoice::{Bolt12Invoice, DEFAULT_RELATIVE_EXPIRY, DerivedSigningPubkey, ExplicitSigningPubkey, InvoiceBuilder, UnsignedBolt12Invoice};
6767use crate::offers::invoice_error::InvoiceError;
68- use crate::offers::invoice_request::{DerivedPayerId, InvoiceRequestBuilder};
68+ use crate::offers::invoice_request::{DerivedPayerId, InvoiceRequest, InvoiceRequestBuilder};
6969use crate::offers::nonce::Nonce;
7070use crate::offers::offer::{Offer, OfferBuilder};
7171use crate::offers::parse::Bolt12SemanticError;
@@ -9142,11 +9142,19 @@ where
91429142 )
91439143 .map_err(|_| Bolt12SemanticError::DuplicatePaymentId)?;
91449144
9145+ self.enqueue_invoice_request(invoice_request, reply_paths)
9146+ }
9147+
9148+ fn enqueue_invoice_request(
9149+ &self,
9150+ invoice_request: InvoiceRequest,
9151+ reply_paths: Vec<BlindedMessagePath>,
9152+ ) -> Result<(), Bolt12SemanticError> {
91459153 let mut pending_offers_messages = self.pending_offers_messages.lock().unwrap();
9146- if !offer .paths().is_empty() {
9154+ if !invoice_request .paths().is_empty() {
91479155 reply_paths
91489156 .iter()
9149- .flat_map(|reply_path| offer .paths().iter().map(move |path| (path, reply_path)))
9157+ .flat_map(|reply_path| invoice_request .paths().iter().map(move |path| (path, reply_path)))
91509158 .take(OFFERS_MESSAGE_REQUEST_LIMIT)
91519159 .for_each(|(path, reply_path)| {
91529160 let instructions = MessageSendInstructions::WithSpecifiedReplyPath {
@@ -9156,7 +9164,7 @@ where
91569164 let message = OffersMessage::InvoiceRequest(invoice_request.clone());
91579165 pending_offers_messages.push((message, instructions));
91589166 });
9159- } else if let Some(signing_pubkey) = offer .signing_pubkey() {
9167+ } else if let Some(signing_pubkey) = invoice_request .signing_pubkey() {
91609168 for reply_path in reply_paths {
91619169 let instructions = MessageSendInstructions::WithSpecifiedReplyPath {
91629170 destination: Destination::Node(signing_pubkey),
0 commit comments