Skip to content

Commit

Permalink
style: improve logging message and code structure
Browse files Browse the repository at this point in the history
  • Loading branch information
S0c5 committed May 23, 2024
1 parent 632c466 commit e59de4a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sube/examples/pallet_communities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
Expand Down

0 comments on commit e59de4a

Please sign in to comment.