diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 984b9a5d1dc..3306004a1ba 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -10893,7 +10893,12 @@ where }; match response { - Ok(invoice) => Some((OffersMessage::Invoice(invoice), responder.respond())), + Ok(invoice) => { + let nonce = nonce.unwrap_or_else(|| Nonce::from_entropy_source(&*self.entropy_source)); + let hmac = signer::hmac_for_payment_hash(payment_hash, nonce, expanded_key); + let context = MessageContext::Offers(OffersContext::InboundPayment { payment_hash, nonce, hmac }); + Some((OffersMessage::Invoice(invoice), responder.respond_with_reply_path(context))) + }, Err(error) => Some((OffersMessage::InvoiceError(error.into()), responder.respond())), } },