From e59de4a18d46b4e369cd2f74dbf2d1fd027839ed Mon Sep 17 00:00:00 2001 From: s0c5 Date: Thu, 23 May 2024 17:04:05 -0500 Subject: [PATCH] style: improve logging message and code structure --- sube/examples/pallet_communities.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sube/examples/pallet_communities.rs b/sube/examples/pallet_communities.rs index 1026cc0..83aaaeb 100644 --- a/sube/examples/pallet_communities.rs +++ b/sube/examples/pallet_communities.rs @@ -8,9 +8,11 @@ use sube::{sube, ExtrinsicBody, Response, Result, SubeBuilder}; async fn main() -> Result<()> { env_logger::init(); - let response = sube!("ws://127.0.0.1:8000/communityTracks/tracks/1").await?; + log::info!("getting all the keys part of the subset"); - if let Response::Value(value) = response { + let response = sube!("ws://127.0.0.1:12281/communityMemberships/collection").await?; + + if let Response::ValueSet(value) = response { let data = serde_json::to_value(&value).expect("it must be a serialized object"); println!("Account info: {}", serde_json::to_string_pretty(&data).expect("it must return an str")); }