From d34f884f1c183108d72790011fa127b50b348d17 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Thu, 7 Sep 2023 13:09:03 -0700 Subject: [PATCH] clean inputs to Web3ProxyError::MethodNotFound --- web3_proxy/src/app/mod.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/web3_proxy/src/app/mod.rs b/web3_proxy/src/app/mod.rs index 249f7cc2..ee5e981b 100644 --- a/web3_proxy/src/app/mod.rs +++ b/web3_proxy/src/app/mod.rs @@ -1315,10 +1315,7 @@ impl Web3ProxyApp { | "shh_post" | "shh_uninstallFilter" | "shh_version") => { - return Err(Web3ProxyError::MethodNotFound(format!( - "the method {} does not exist/is not available", - method - ).into())); + return Err(Web3ProxyError::MethodNotFound(method.to_owned().into())); } // TODO: implement these commands method @ ("eth_getFilterChanges" @@ -1328,10 +1325,7 @@ impl Web3ProxyApp { | "eth_newPendingTransactionFilter" | "eth_pollSubscriptions" | "eth_uninstallFilter") => { - return Err(Web3ProxyError::MethodNotFound(format!( - "the method {} is not yet implemented. contact us if you need this", - method - ).into())); + return Err(Web3ProxyError::MethodNotFound(method.to_owned().into())); } method @ ("eth_sendUserOperation" | "eth_estimateUserOperationGas"