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 13, 2023
1 parent 2c1a922 commit bd42eb0
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 @@ -7169,6 +7169,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 bd42eb0

Please sign in to comment.