From 6b7226eade508520c9a15846b9ad5e05e567e537 Mon Sep 17 00:00:00 2001 From: Ajinkya Kulkarni Date: Tue, 25 Feb 2025 14:38:56 +0100 Subject: [PATCH] WIP --- crates/utils/cw-client/src/cli.rs | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/crates/utils/cw-client/src/cli.rs b/crates/utils/cw-client/src/cli.rs index 29d7250..49b9a86 100644 --- a/crates/utils/cw-client/src/cli.rs +++ b/crates/utils/cw-client/src/cli.rs @@ -72,7 +72,7 @@ impl CliClient { let output = command.output().expect("command output failed").stdout; let output_str: String = std::str::from_utf8(&output).expect("unable to parse command output").to_string(); let json: Value = serde_json::from_str(&output_str).expect("could not convert to JSON"); - let amount = strip_dquotes(json["price"]["amount"].to_string())); + let amount = strip_dquotes(json["price"]["amount"].to_string()); let price = amount.as_f64().expect("couldn't parse gas price"); @@ -288,23 +288,3 @@ impl CwClient for CliClient { } } -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn it_works() { - let mut command = Command::new("neutrond"); - let command = command - .arg("q") - .arg("feemarket") - .arg("gas-price") - .arg("untrn") - .arg("-o") - .arg("json"); - let output = command.output().expect("command output failed").stdout; - let output_str: String = std::str::from_utf8(&output).expect("unable to parse command output").to_string(); - let json: Value = serde_json::from_str(&output_str).expect("could not convert to JSON"); - assert_eq!(strip_dquotes(json["price"]["amount"].to_string()), "0.005300000000000000"); - } -}