Skip to content

Commit b0381e1

Browse files
authored
fix(forge): v1.3 do not throw if etherscan api key set and unknown chain (#11444)
fix(forge): do not throw if etherescan api key set and unknown chain
1 parent c4245d6 commit b0381e1

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

crates/config/src/lib.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,19 +1429,11 @@ impl Config {
14291429

14301430
// etherscan fallback via API key
14311431
if let Some(key) = self.etherscan_api_key.as_ref() {
1432-
match ResolvedEtherscanConfig::create(
1432+
return Ok(ResolvedEtherscanConfig::create(
14331433
key,
14341434
chain.or(self.chain).unwrap_or_default(),
14351435
default_api_version,
1436-
) {
1437-
Some(config) => return Ok(Some(config)),
1438-
None => {
1439-
return Err(EtherscanConfigError::UnknownChain(
1440-
String::new(),
1441-
chain.unwrap_or_default(),
1442-
));
1443-
}
1444-
}
1436+
));
14451437
}
14461438
Ok(None)
14471439
}

0 commit comments

Comments
 (0)