nit: Explicitly handle all chains on match (#1635)

This commit is contained in:
Marcelo Fornet 2022-08-25 18:09:45 +02:00 committed by GitHub
parent f3da435081
commit 6c017990a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 1 deletions

View File

@ -93,7 +93,22 @@ impl Chain {
Chain::Oasis => 5_500, Chain::Oasis => 5_500,
Chain::Emerald => 6_000, Chain::Emerald => 6_000,
Chain::Dev | Chain::AnvilHardhat => 200, Chain::Dev | Chain::AnvilHardhat => 200,
_ => return None, // Explictly handle all network to make it easier not to forget this match when new
// networks are added.
Chain::Morden |
Chain::Ropsten |
Chain::Rinkeby |
Chain::Goerli |
Chain::Kovan |
Chain::XDai |
Chain::Sepolia |
Chain::Moonbase |
Chain::MoonbeamDev |
Chain::OptimismKovan |
Chain::Poa |
Chain::Sokol |
Chain::Rsk |
Chain::EmeraldTestnet => return None,
}; };
Some(Duration::from_millis(ms)) Some(Duration::from_millis(ms))