Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Nov 27, 2024
1 parent a4b83bb commit 146fb4f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions zebra-node-services/src/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ impl RpcRequestClient {
fn json_result_from_response_text<T: serde::de::DeserializeOwned>(
response_text: &str,
) -> std::result::Result<T, BoxError> {
let output: jsonrpsee_types::Response<serde_json::Value> = serde_json::from_str(response_text)?;
let output: jsonrpsee_types::Response<serde_json::Value> =
serde_json::from_str(response_text)?;
match output.payload {
jsonrpsee_types::ResponsePayload::Success(success) => Ok(serde_json::from_value(success.into_owned())?),
jsonrpsee_types::ResponsePayload::Success(success) => {
Ok(serde_json::from_value(success.into_owned())?)
}
jsonrpsee_types::ResponsePayload::Error(failure) => Err(failure.to_string().into()),
}
}
Expand Down

0 comments on commit 146fb4f

Please sign in to comment.