From 102fe9077c2b0fe485e27f30c267b1d9989cbc98 Mon Sep 17 00:00:00 2001 From: Ratan Kaliani Date: Mon, 22 Jan 2024 15:48:30 -0800 Subject: [PATCH] refactor(succinct-client): gateway not found (#337) --- client/src/request.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/client/src/request.rs b/client/src/request.rs index 97392912..5df434fc 100644 --- a/client/src/request.rs +++ b/client/src/request.rs @@ -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 { @@ -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(