fix: lowercase node client type (#600)
This commit is contained in:
parent
cd2c9f6dd1
commit
a28476dccc
|
@ -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),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue