Skip to content

Commit cf28044

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 6ed398d commit cf28044

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
@@ -10620,7 +10620,10 @@ where
1062010620
};
1062110621

1062210622
match response {
10623-
Ok(invoice) => responder.respond(OffersMessage::Invoice(invoice)),
10623+
Ok(invoice) => {
10624+
let context = MessageContext::Offers(OffersContext::Unknown {});
10625+
responder.respond_with_reply_path(OffersMessage::Invoice(invoice), context)
10626+
},
1062410627
Err(error) => responder.respond(OffersMessage::InvoiceError(error.into())),
1062510628
}
1062610629
},

0 commit comments

Comments
 (0)