From 2749bd300bd061c1862e1d074f87d7376a5c90d0 Mon Sep 17 00:00:00 2001 From: Greg Hill Date: Tue, 3 Aug 2021 10:26:29 +0100 Subject: [PATCH] deps: update jsonrpsee 0.3.0 (#289) Signed-off-by: Gregory Hill --- Cargo.toml | 8 ++++---- client/Cargo.toml | 2 +- client/src/lib.rs | 11 ++++++----- src/error.rs | 2 +- src/lib.rs | 6 ++---- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 913d7d98fea7f..9db2aa202b5b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,10 +29,10 @@ codec = { package = "parity-scale-codec", version = "2.1", default-features = fa dyn-clone = "1.0.4" futures = "0.3.13" hex = "0.4.3" -jsonrpsee-proc-macros = "0.2.0" -jsonrpsee-ws-client = { version = "0.2.0", default-features = false } -jsonrpsee-http-client = { version = "0.2.0", default-features = false } -jsonrpsee-types = "0.2.0" +jsonrpsee-proc-macros = "0.3.0" +jsonrpsee-ws-client = { version = "0.3.0", default-features = false } +jsonrpsee-http-client = { version = "0.3.0", default-features = false } +jsonrpsee-types = "0.3.0" log = "0.4.14" num-traits = { version = "0.2.14", default-features = false } serde = { version = "1.0.124", features = ["derive"] } diff --git a/client/Cargo.toml b/client/Cargo.toml index b9e2f4bb41607..1db03872419d1 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -15,7 +15,7 @@ keywords = ["parity", "substrate", "blockchain"] async-std = "1.8.0" futures = { version = "0.3.9", features = ["compat"], package = "futures" } futures01 = { package = "futures", version = "0.1.29" } -jsonrpsee-types = "0.2.0" +jsonrpsee-types = "0.3.0" log = "0.4.13" serde_json = "1.0.61" thiserror = "1.0.23" diff --git a/client/src/lib.rs b/client/src/lib.rs index 3c7461b3d2912..76c55a936c6ed 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -48,18 +48,17 @@ use jsonrpsee_types::{ params::{ Id, JsonRpcParams, + JsonRpcSubscriptionParams, SubscriptionId, TwoPointZero, }, request::{ JsonRpcCallSer, JsonRpcInvalidRequest, + JsonRpcNotification, JsonRpcNotificationSer, }, - response::{ - JsonRpcResponse, - JsonRpcSubscriptionResponseAlloc, - }, + response::JsonRpcResponse, }, DeserializeOwned, Error as JsonRpseeError, @@ -210,7 +209,9 @@ impl SubxtClient { while let Some(Ok(response)) = from_back.next().await { let notif = serde_json::from_str::< - JsonRpcSubscriptionResponseAlloc, + JsonRpcNotification< + JsonRpcSubscriptionParams<_>, + >, >( &response ) diff --git a/src/error.rs b/src/error.rs index a86bfe984cd2d..4f5e3a1db786f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with substrate-subxt. If not, see . -use jsonrpsee_ws_client::Error as RequestError; +use jsonrpsee_types::Error as RequestError; use sp_core::crypto::SecretStringError; use sp_runtime::{ transaction_validity::TransactionValidityError, diff --git a/src/lib.rs b/src/lib.rs index 286e298b1ce42..961056e44505d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -52,10 +52,8 @@ use codec::{ }; use futures::future; use jsonrpsee_http_client::HttpClientBuilder; -use jsonrpsee_ws_client::{ - Subscription, - WsClientBuilder, -}; +use jsonrpsee_types::Subscription; +use jsonrpsee_ws_client::WsClientBuilder; use sp_core::{ storage::{ StorageChangeSet,