diff --git a/subxt/src/blocks/blocks_client.rs b/subxt/src/blocks/blocks_client.rs index b760967cc3..91848762e3 100644 --- a/subxt/src/blocks/blocks_client.rs +++ b/subxt/src/blocks/blocks_client.rs @@ -172,14 +172,11 @@ where .subscribe_chainhead_follow(runtime_updates) .await?; - let _subscription_id = match sub.subscription_id() { + let subscription_id = match sub.subscription_id() { Some(id) => id.clone(), None => return Err(Error::Other("Subscription without ID".into())), }; - // TODO: Jsonrpsee needs update. - let subscription_id = "A".to_string(); - // Flatten the finalized events and map them into a `FollowBlock`. Ok(sub .flat_map(move |event| { diff --git a/subxt/src/rpc/rpc.rs b/subxt/src/rpc/rpc.rs index f673352b66..e6396d82f9 100644 --- a/subxt/src/rpc/rpc.rs +++ b/subxt/src/rpc/rpc.rs @@ -872,14 +872,11 @@ impl Rpc { let (bytes, event) = { let mut sub = self.subscribe_chainhead_follow(true).await?; - let subscription_id_rpc = match sub.subscription_id() { + let subscription_id = match sub.subscription_id() { Some(id) => id.clone(), None => return Err(Error::Other("Subscription without ID".into())), }; - println!("Recv from jsonrpsee: {:?}", subscription_id_rpc); - - // TODO: Jsonrpsee needs update. - let subscription_id = "A".to_string(); + println!("RPC Subscription ID: {:?}", subscription_id); let event = match sub.next().await { Some(event) => event, @@ -899,7 +896,7 @@ impl Rpc { let bytes = self .fetch_chainhead_call( - subscription_id, + subscription_id.clone(), event.finalized_block_hash, "Metadata_metadata".into(), &vec![], @@ -910,7 +907,7 @@ impl Rpc { .client .request( "chainHead_unstable_unfollow", - rpc_params![subscription_id_rpc], + rpc_params![subscription_id], ) .await?;