clean inputs to Web3ProxyError::MethodNotFound

This commit is contained in:
Bryan Stitt 2023-09-07 13:09:03 -07:00
parent c53b9eb5d1
commit d34f884f1c

View File

@ -1315,10 +1315,7 @@ impl Web3ProxyApp {
| "shh_post" | "shh_post"
| "shh_uninstallFilter" | "shh_uninstallFilter"
| "shh_version") => { | "shh_version") => {
return Err(Web3ProxyError::MethodNotFound(format!( return Err(Web3ProxyError::MethodNotFound(method.to_owned().into()));
"the method {} does not exist/is not available",
method
).into()));
} }
// TODO: implement these commands // TODO: implement these commands
method @ ("eth_getFilterChanges" method @ ("eth_getFilterChanges"
@ -1328,10 +1325,7 @@ impl Web3ProxyApp {
| "eth_newPendingTransactionFilter" | "eth_newPendingTransactionFilter"
| "eth_pollSubscriptions" | "eth_pollSubscriptions"
| "eth_uninstallFilter") => { | "eth_uninstallFilter") => {
return Err(Web3ProxyError::MethodNotFound(format!( return Err(Web3ProxyError::MethodNotFound(method.to_owned().into()));
"the method {} is not yet implemented. contact us if you need this",
method
).into()));
} }
method @ ("eth_sendUserOperation" method @ ("eth_sendUserOperation"
| "eth_estimateUserOperationGas" | "eth_estimateUserOperationGas"