@@ -9092,7 +9092,9 @@ where
90929092 let invoice_request = builder.build_and_sign()?;
90939093
90949094 let hmac = payment_id.hmac_for_offer_payment(nonce, expanded_key);
9095- let context = OffersContext::OutboundPayment { payment_id, nonce, hmac: Some(hmac) };
9095+ let context = MessageContext::Offers(
9096+ OffersContext::OutboundPayment { payment_id, nonce, hmac: Some(hmac) }
9097+ );
90969098 let reply_paths = self.create_blinded_paths(context)
90979099 .map_err(|_| Bolt12SemanticError::MissingPaths)?;
90989100
@@ -9197,9 +9199,9 @@ where
91979199 let builder: InvoiceBuilder<DerivedSigningPubkey> = builder.into();
91989200 let invoice = builder.allow_mpp().build_and_sign(secp_ctx)?;
91999201
9200- let context = OffersContext::InboundPayment {
9202+ let context = MessageContext::Offers( OffersContext::InboundPayment {
92019203 payment_hash: invoice.payment_hash(),
9202- };
9204+ }) ;
92039205 let reply_paths = self.create_blinded_paths(context)
92049206 .map_err(|_| Bolt12SemanticError::MissingPaths)?;
92059207
@@ -9347,7 +9349,7 @@ where
93479349 if absolute_expiry.unwrap_or(Duration::MAX) <= max_short_lived_absolute_expiry {
93489350 self.create_compact_blinded_paths(context)
93499351 } else {
9350- self.create_blinded_paths(context)
9352+ self.create_blinded_paths(MessageContext::Offers( context) )
93519353 }
93529354 }
93539355
@@ -9368,7 +9370,7 @@ where
93689370 /// [`MessageRouter::create_blinded_paths`].
93699371 ///
93709372 /// Errors if the `MessageRouter` errors.
9371- fn create_blinded_paths(&self, context: OffersContext ) -> Result<Vec<BlindedMessagePath>, ()> {
9373+ fn create_blinded_paths(&self, context: MessageContext ) -> Result<Vec<BlindedMessagePath>, ()> {
93729374 let recipient = self.get_our_node_id();
93739375 let secp_ctx = &self.secp_ctx;
93749376
@@ -9381,7 +9383,7 @@ where
93819383 .collect::<Vec<_>>();
93829384
93839385 self.router
9384- .create_blinded_paths(recipient, MessageContext::Offers( context) , peers, secp_ctx)
9386+ .create_blinded_paths(recipient, context, peers, secp_ctx)
93859387 .and_then(|paths| (!paths.is_empty()).then(|| paths).ok_or(()))
93869388 }
93879389
0 commit comments