We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 902c56a commit e0fcca0Copy full SHA for e0fcca0
lightning/src/ln/channelmanager.rs
@@ -10366,8 +10366,17 @@ where
10366
}
10367
},
10368
OffersMessage::Invoice(invoice) => {
10369
+ let expected_payment_id = match context {
10370
+ OffersContext::OutboundPayment { payment_id } => payment_id,
10371
+ _ => return ResponseInstruction::NoResponse,
10372
+ };
10373
+
10374
let result = match invoice.verify(expanded_key, secp_ctx) {
10375
Ok(payment_id) => {
10376
+ if payment_id != expected_payment_id {
10377
+ return ResponseInstruction::NoResponse;
10378
+ }
10379
10380
let features = self.bolt12_invoice_features();
10381
if invoice.invoice_features().requires_unknown_bits_from(&features) {
10382
Err(InvoiceError::from(Bolt12SemanticError::UnknownRequiredFeatures))
0 commit comments