This commit is contained in:
Ajinkya Kulkarni 2025-02-25 14:44:04 +01:00
parent 970f3d9fef
commit 7da12140fd

View file

@ -71,7 +71,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()).expect("couldn't remove quotes");
let price = amount.parse::<f64>().expect("couldn't parse gas price");