diff --git a/lib/ain-ocean/src/api/rpc.rs b/lib/ain-ocean/src/api/rpc.rs index 809f0853ec..6a5520b9af 100644 --- a/lib/ain-ocean/src/api/rpc.rs +++ b/lib/ain-ocean/src/api/rpc.rs @@ -54,12 +54,12 @@ fn method_whitelist(method: &str) -> Result<()> { async fn rpc( Extension(ctx): Extension>, Json(body): Json, -) -> Result> { +) -> Result { method_whitelist(&body.method)?; let res: serde_json::Value = ctx.client.call(&body.method, &body.params).await?; - Ok(Response::new(res)) + Ok(res) } pub fn router(ctx: Arc) -> Router {