starting on serde for sp responses

This commit is contained in:
mfahampshire
2023-07-06 16:49:08 +02:00
parent 33bc7c0c7c
commit 80d38f795c
2 changed files with 3 additions and 2 deletions
@@ -21,4 +21,5 @@ cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegr
tokio = { version = "1.24.1", features = ["rt-multi-thread", "macros"] }
ts-rs = "6.1.2"
bs58 = "0.5.0"
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
@@ -59,7 +59,7 @@ pub async fn offline_sign(mnemonic: bip39::Mnemonic, to: AccountId, client: &mut
client.send_str(sp_address, &serde_json::to_string(&message).unwrap()).await;
let res = client.wait_for_messages().await;
for i in res.unwrap().iter() {
println!("{:#?}", i);
println!("{:#?}", i.message);
}
// parse json of res to get signer_data and chain_id, store in SeqResData struct