From fd9431d5dc53993f0651c9483e32ca026184d691 Mon Sep 17 00:00:00 2001 From: Ajinkya Kulkarni Date: Tue, 25 Feb 2025 13:11:47 +0100 Subject: [PATCH] WIP --- crates/utils/cw-client/src/cli.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/utils/cw-client/src/cli.rs b/crates/utils/cw-client/src/cli.rs index 1074bef..66c2d0c 100644 --- a/crates/utils/cw-client/src/cli.rs +++ b/crates/utils/cw-client/src/cli.rs @@ -4,6 +4,7 @@ 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 crate::CwClient; @@ -72,7 +73,7 @@ impl CliClient { 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 price = json["price"]["amount"].to_string().parse::().expect("couldn't parse gas price"); + let price = u64::from_str(&json["price"]["amount"].to_string()).expect("couldn't parse gas price"); let gas_price = format!("{}untrn", price); Self {