@@ -65,7 +65,7 @@ use crate::ln::outbound_payment::{OutboundPayments, PaymentAttempts, PendingOutb
65
65
use crate::ln::wire::Encode;
66
66
use crate::offers::invoice::{Bolt12Invoice, DEFAULT_RELATIVE_EXPIRY, DerivedSigningPubkey, ExplicitSigningPubkey, InvoiceBuilder, UnsignedBolt12Invoice};
67
67
use crate::offers::invoice_error::InvoiceError;
68
- use crate::offers::invoice_request::{DerivedPayerId, InvoiceRequestBuilder};
68
+ use crate::offers::invoice_request::{DerivedPayerId, InvoiceRequest, InvoiceRequestBuilder};
69
69
use crate::offers::nonce::Nonce;
70
70
use crate::offers::offer::{Offer, OfferBuilder};
71
71
use crate::offers::parse::Bolt12SemanticError;
@@ -9142,11 +9142,19 @@ where
9142
9142
)
9143
9143
.map_err(|_| Bolt12SemanticError::DuplicatePaymentId)?;
9144
9144
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> {
9145
9153
let mut pending_offers_messages = self.pending_offers_messages.lock().unwrap();
9146
- if !offer .paths().is_empty() {
9154
+ if !invoice_request .paths().is_empty() {
9147
9155
reply_paths
9148
9156
.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)))
9150
9158
.take(OFFERS_MESSAGE_REQUEST_LIMIT)
9151
9159
.for_each(|(path, reply_path)| {
9152
9160
let instructions = MessageSendInstructions::WithSpecifiedReplyPath {
@@ -9156,7 +9164,7 @@ where
9156
9164
let message = OffersMessage::InvoiceRequest(invoice_request.clone());
9157
9165
pending_offers_messages.push((message, instructions));
9158
9166
});
9159
- } else if let Some(signing_pubkey) = offer .signing_pubkey() {
9167
+ } else if let Some(signing_pubkey) = invoice_request .signing_pubkey() {
9160
9168
for reply_path in reply_paths {
9161
9169
let instructions = MessageSendInstructions::WithSpecifiedReplyPath {
9162
9170
destination: Destination::Node(signing_pubkey),
0 commit comments