mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 05:51:02 +00:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user