Skip to content

Commit

Permalink
f - check if the Offer supports the chain
Browse files Browse the repository at this point in the history
  • Loading branch information
jkczyz committed Oct 16, 2023
1 parent 9f980fc commit 6b96866
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lightning/src/ln/channelmanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7171,6 +7171,10 @@ where
let entropy = &*self.entropy_source;
let secp_ctx = &self.secp_ctx;

if !offer.supports_chain(self.chain_hash) {
return Err(Bolt12SemanticError::UnsupportedChain);
}

let builder = offer.request_invoice_deriving_payer_id(
expanded_key, entropy, secp_ctx, payment_id
)?;
Expand Down

0 comments on commit 6b96866

Please sign in to comment.