chore(deps): bump jsonrpsee v0.20 to v0.21 (#1347)

* chore(deps): bump jsonrpsee v0.20 to v0.21

* fix build

* update Cargo.lock in wasm-tests
This commit is contained in:
Niklas Adolfsson
2024-01-12 10:48:44 +01:00
committed by GitHub
parent fc5a18aaa0
commit ee95026186
13 changed files with 1093 additions and 794 deletions
+1 -2
View File
@@ -9,7 +9,6 @@ use jsonrpsee::{
core::{
client::{Client, ClientT, SubscriptionClientT, SubscriptionKind},
traits::ToRpcParams,
Error as JsonRpseeError,
},
types::SubscriptionId,
};
@@ -18,7 +17,7 @@ use serde_json::value::RawValue;
struct Params(Option<Box<RawValue>>);
impl ToRpcParams for Params {
fn to_rpc_params(self) -> Result<Option<Box<RawValue>>, JsonRpseeError> {
fn to_rpc_params(self) -> Result<Option<Box<RawValue>>, serde_json::Error> {
Ok(self.0)
}
}
+7 -6
View File
@@ -240,9 +240,13 @@ impl<Res: DeserializeOwned> Stream for RpcSubscription<Res> {
#[cfg(all(feature = "jsonrpsee", feature = "native"))]
mod jsonrpsee_helpers {
pub use jsonrpsee::{
client_transport::ws::{Receiver, Sender, Url, WsTransportClientBuilder},
core::{client::Client, Error},
client_transport::ws::{self, EitherStream, Url, WsTransportClientBuilder},
core::client::{Client, Error},
};
use tokio_util::compat::Compat;
pub type Sender = ws::Sender<Compat<EitherStream>>;
pub type Receiver = ws::Receiver<Compat<EitherStream>>;
/// Build WS RPC client from URL
pub async fn client(url: &str) -> Result<Client, Error> {
@@ -266,10 +270,7 @@ mod jsonrpsee_helpers {
mod jsonrpsee_helpers {
pub use jsonrpsee::{
client_transport::web,
core::{
client::{Client, ClientBuilder},
Error,
},
core::client::{Client, ClientBuilder, Error},
};
/// Build web RPC client from URL