Skip to content

Commit d535fa1

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 680d399 commit d535fa1

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
@@ -10852,7 +10852,10 @@ where
1085210852
};
1085310853

1085410854
match response {
10855-
Ok(invoice) => responder.respond(OffersMessage::Invoice(invoice)),
10855+
Ok(invoice) => {
10856+
let context = MessageContext::Offers(OffersContext::InboundPayment { payment_hash });
10857+
responder.respond_with_reply_path(OffersMessage::Invoice(invoice), context)
10858+
},
1085610859
Err(error) => responder.respond(OffersMessage::InvoiceError(error.into())),
1085710860
}
1085810861
},

0 commit comments

Comments
 (0)