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;
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s.split('/').next().unwrap() {
"Geth" => Ok(NodeClient::Geth),
"Erigon" => Ok(NodeClient::Erigon),
"OpenEthereum" => Ok(NodeClient::OpenEthereum),
"Nethermind" => Ok(NodeClient::Nethermind),
match s.split('/').next().unwrap().to_lowercase().as_str() {
"geth" => Ok(NodeClient::Geth),
"erigon" => Ok(NodeClient::Erigon),
"openethereum" => Ok(NodeClient::OpenEthereum),
"nethermind" => Ok(NodeClient::Nethermind),
"besu" => Ok(NodeClient::Besu),
_ => Err(ProviderError::UnsupportedNodeClient),
}