Skip to content

Commit

Permalink
refactor(succinct-client): gateway not found (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani authored Jan 22, 2024
1 parent 889643f commit 102fe90
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions client/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct OffchainInput {
}

#[allow(non_snake_case)]
#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug)]
/// Proof data for a Succinct X function call.
/// This is the data that is returned from the Succinct X API.
struct SuccinctProofData {
Expand Down Expand Up @@ -387,10 +387,12 @@ impl SuccinctClient {
let client = Arc::new(SignerMiddleware::new(provider, wallet.clone()));

let address = get_gateway_address(succinct_proof_data.chain_id);
info!(
"Could not find canonical gateway address for chain {}",
succinct_proof_data.chain_id
);
if address.is_none() {
info!(
"Could not find canonical gateway address for chain {}",
succinct_proof_data.chain_id
);
}

// If gateway_address is provided, use that instead of the canonical gateway address.
let mut gateway_address = gateway_address.or(address).expect(
Expand Down

0 comments on commit 102fe90

Please sign in to comment.