diff --git a/crates/utils/cw-client/src/cli.rs b/crates/utils/cw-client/src/cli.rs index 332d99b..661eb06 100644 --- a/crates/utils/cw-client/src/cli.rs +++ b/crates/utils/cw-client/src/cli.rs @@ -4,12 +4,11 @@ use color_eyre::{eyre::eyre, Help, Report, Result}; use cosmrs::{tendermint::chain::Id, AccountId}; use reqwest::Url; use serde::de::DeserializeOwned; - use std::str::FromStr; use quoted_string::strip_dquotes; use crate::CwClient; #[derive(Clone, Debug)] -pub enum CliClientType {g +pub enum CliClientType { Wasmd, Neutrond, } @@ -72,9 +71,9 @@ 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"); + let price = amount.parse::().expect("couldn't parse gas price"); let gas_price = format!("{}untrn", price);