Skip to content

Commit 3bdc567

Browse files
committed
Add reply_path to BOLT12Invoices in Offers Flow
1. Introduced reply_path in BOLT12Invoices to address a gap in error handling. Previously, if a BOLT12Invoice sent in the offers flow generated an Invoice Error, the payer had no way to send this error back to the payee. 2. By adding a reply_path to the Invoice Message, the payer can now communicate any errors back to the payee, ensuring better error handling and communication within the offers flow.
1 parent 5e62df7 commit 3bdc567

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10891,7 +10891,10 @@ where
1089110891
};
1089210892

1089310893
match response {
10894-
Ok(invoice) => Some((OffersMessage::Invoice(invoice), responder.respond())),
10894+
Ok(invoice) => {
10895+
let context = MessageContext::Offers(OffersContext::InboundPayment { payment_hash });
10896+
Some((OffersMessage::Invoice(invoice), responder.respond_with_reply_path(context)))
10897+
},
1089510898
Err(error) => Some((OffersMessage::InvoiceError(error.into()), responder.respond())),
1089610899
}
1089710900
},

0 commit comments

Comments
 (0)