From de16ca2bd5c8d78dd31739ac62e03d5e784c3c81 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 13 Jul 2023 22:09:50 +0200 Subject: [PATCH] comment and import tidyup --- demos/rust-cosmos-broadcaster/bin/client.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/demos/rust-cosmos-broadcaster/bin/client.rs b/demos/rust-cosmos-broadcaster/bin/client.rs index 6dbaae0cc2..406a719f8d 100644 --- a/demos/rust-cosmos-broadcaster/bin/client.rs +++ b/demos/rust-cosmos-broadcaster/bin/client.rs @@ -1,7 +1,6 @@ -use clap::{ Parser, Subcommand, Args}; -use nym_sdk::mixnet::{Recipient}; +use clap::{Parser, Subcommand, Args}; +use nym_sdk::mixnet::Recipient; use nym_validator_client::nyxd::AccountId; - use rust_cosmos_broadcaster::{client::{offline_sign, send_tx}, create_client}; #[derive(Debug, Parser)] @@ -57,13 +56,13 @@ async fn main() { let stdin = std::io::stdin(); let _n = stdin.read_line(&mut input).unwrap(); - if input.starts_with('y') { // TODO add proper parsing for getting y/n + if input.starts_with('y') { println!("\nsending tx thru the mixnet to broadcaster service"); let tx_hash = send_tx(base58_tx_bytes, sp_address, &mut client).await; println!("the response from the broadcaster: {:#?}", tx_hash); } else if input.starts_with('n') { println!("\nok, you can send the signed tx at a later date by passing the base58 string above as the argument for send-tx") - } else { //TODO make a loop & return to the question if input is not y/n? + } else { println!("\nunrecognised user input"); } }