fix: lowercase node client type (#600)

This commit is contained in:
Georgios Konstantopoulos 2021-11-21 18:12:40 +02:00 committed by GitHub
parent cd2c9f6dd1
commit a28476dccc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -44,11 +44,11 @@ impl FromStr for NodeClient {
type Err = ProviderError; type Err = ProviderError;
fn from_str(s: &str) -> Result<Self, Self::Err> { fn from_str(s: &str) -> Result<Self, Self::Err> {
match s.split('/').next().unwrap() { match s.split('/').next().unwrap().to_lowercase().as_str() {
"Geth" => Ok(NodeClient::Geth), "geth" => Ok(NodeClient::Geth),
"Erigon" => Ok(NodeClient::Erigon), "erigon" => Ok(NodeClient::Erigon),
"OpenEthereum" => Ok(NodeClient::OpenEthereum), "openethereum" => Ok(NodeClient::OpenEthereum),
"Nethermind" => Ok(NodeClient::Nethermind), "nethermind" => Ok(NodeClient::Nethermind),
"besu" => Ok(NodeClient::Besu), "besu" => Ok(NodeClient::Besu),
_ => Err(ProviderError::UnsupportedNodeClient), _ => Err(ProviderError::UnsupportedNodeClient),
} }