Skip to content

Commit

Permalink
feat(jsonrpc): require Sync on transport params (#474)
Browse files Browse the repository at this point in the history
  • Loading branch information
clint419 authored Oct 30, 2023
1 parent 37e5333 commit d53338b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions starknet-providers/src/jsonrpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub struct JsonRpcClient<T> {
transport: T,
}

#[derive(Debug, Serialize, Deserialize)]
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
pub enum JsonRpcMethod {
#[serde(rename = "starknet_getBlockWithTxHashes")]
GetBlockWithTxHashes,
Expand Down Expand Up @@ -177,7 +177,7 @@ where
{
async fn send_request<P, R>(&self, method: JsonRpcMethod, params: P) -> Result<R, ProviderError>
where
P: Serialize + Send,
P: Serialize + Send + Sync,
R: DeserializeOwned,
{
match self
Expand Down
2 changes: 1 addition & 1 deletion starknet-providers/src/jsonrpc/transports/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ pub trait JsonRpcTransport {
params: P,
) -> Result<JsonRpcResponse<R>, Self::Error>
where
P: Serialize + Send,
P: Serialize + Send + Sync,
R: DeserializeOwned;
}

0 comments on commit d53338b

Please sign in to comment.