diff --git a/examples/examples/custom_rpc_client.rs b/examples/examples/custom_rpc_client.rs index 52e0cd8227..a4be9a6a0a 100644 --- a/examples/examples/custom_rpc_client.rs +++ b/examples/examples/custom_rpc_client.rs @@ -16,6 +16,7 @@ use subxt::{ RpcClientT, RpcFuture, RpcSubscription, + RpcSubscriptionId, }, OnlineClient, PolkadotConfig, @@ -54,7 +55,7 @@ impl RpcClientT for MyLoggingClient { sub: &'a str, params: Option>, unsub: &'a str, - ) -> RpcFuture<'a, RpcSubscription> { + ) -> RpcFuture<'a, (RpcSubscription, Option)> { writeln!( self.log.lock().unwrap(), "{sub}({}) (unsub: {unsub})", @@ -68,7 +69,8 @@ impl RpcClientT for MyLoggingClient { let res = RawValue::from_string("[]".to_string()).unwrap(); let stream = futures::stream::once(async move { Ok(res) }); let stream: Pin + Send>> = Box::pin(stream); - Box::pin(std::future::ready(Ok(stream))) + // This subscription does not provide an ID. + Box::pin(std::future::ready(Ok((stream, None)))) } }