File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -330,14 +330,16 @@ impl ResolvedEtherscanConfig {
330
330
}
331
331
332
332
let api_url = into_url ( & api_url) ?;
333
- let parsed_api_version = EtherscanApiVersion :: try_from ( api_version. unwrap_or_default ( ) ) ?;
333
+ let parsed_api_version = api_version
334
+ . map ( EtherscanApiVersion :: try_from)
335
+ . transpose ( ) ?;
334
336
let client = reqwest:: Client :: builder ( )
335
337
. user_agent ( ETHERSCAN_USER_AGENT )
336
338
. tls_built_in_root_certs ( api_url. scheme ( ) == "https" )
337
339
. build ( ) ?;
338
340
foundry_block_explorers:: Client :: builder ( )
339
341
. with_client ( client)
340
- . with_api_version ( parsed_api_version)
342
+ . with_api_version ( parsed_api_version. unwrap_or_default ( ) )
341
343
. with_api_key ( api_key)
342
344
. with_api_url ( api_url) ?
343
345
// the browser url is not used/required by the client so we can simply set the
You can’t perform that action at this time.
0 commit comments