mirror of
https://github.com/transatoshi-mw/grin-explorer.git
synced 2025-10-21 13:33:41 +00:00
update value name
This commit is contained in:
@@ -31,7 +31,7 @@ pub struct Dashboard {
|
||||
// mining
|
||||
pub production_cost: String,
|
||||
pub reward_ratio: String,
|
||||
pub break_even_cost: String,
|
||||
pub breakeven_cost: String,
|
||||
// mempool
|
||||
pub txns: String,
|
||||
pub stem: String,
|
||||
@@ -61,7 +61,7 @@ impl Dashboard {
|
||||
difficulty: String::new(),
|
||||
production_cost: String::new(),
|
||||
reward_ratio: String::new(),
|
||||
break_even_cost: String::new(),
|
||||
breakeven_cost: String::new(),
|
||||
txns: String::new(),
|
||||
stem: String::new(),
|
||||
}
|
||||
|
@@ -344,7 +344,7 @@ fn reward_ratio(dashboard: &State<Arc<Mutex<Dashboard>>>) -> String {
|
||||
fn breakeven_cost(dashboard: &State<Arc<Mutex<Dashboard>>>) -> String {
|
||||
let data = dashboard.lock().unwrap();
|
||||
|
||||
format!("$ {}", data.break_even_cost)
|
||||
format!("$ {}", data.breakeven_cost)
|
||||
}
|
||||
|
||||
|
||||
|
@@ -232,7 +232,7 @@ pub async fn get_mining_stats(dashboard: Arc<Mutex<Dashboard>>) -> Result<(), Er
|
||||
|
||||
data.reward_ratio = format!("{:.2}", data.price_usd.parse::<f64>().unwrap()
|
||||
/ data.production_cost.parse::<f64>().unwrap());
|
||||
data.break_even_cost = format!("{:.2}", data.price_usd.parse::<f64>().unwrap()
|
||||
data.breakeven_cost = format!("{:.2}", data.price_usd.parse::<f64>().unwrap()
|
||||
/ (120.0 / 1000.0 * (1.0 / coins_per_hour)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user