WIP
This commit is contained in:
parent
b6055e661b
commit
04cfb8d16f
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ impl CliClient {
|
||||||
let output_str: String = std::str::from_utf8(&output).expect("unable to parse command output").to_string();
|
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 json: Value = serde_json::from_str(&output_str).expect("could not convert to JSON");
|
||||||
|
|
||||||
let price = f64::from_str(&json["price"]["amount"].to_string()).expect("couldn't parse gas price");
|
let price = &json["price"]["amount"].as_f64().expect("couldn't parse gas price");
|
||||||
let gas_price = format!("{}untrn", price);
|
let gas_price = format!("{}untrn", price);
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
|
|
Loading…
Reference in a new issue