From f8f1260e1f56e674705f0c1403761bc287813a18 Mon Sep 17 00:00:00 2001 From: mostafaei2002 Date: Tue, 11 Jun 2024 14:10:30 +0330 Subject: [PATCH] fix: backend manual hashrate metric --- src/app/panels/middle/xvb.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/panels/middle/xvb.rs b/src/app/panels/middle/xvb.rs index 7311e4e..520856a 100644 --- a/src/app/panels/middle/xvb.rs +++ b/src/app/panels/middle/xvb.rs @@ -200,7 +200,6 @@ impl crate::disk::state::Xvb { } if ui.add(egui::SelectableLabel::new(self.manual_donation_metric == ManualDonationMetric::Kilo, "kH/s")).clicked() { self.manual_donation_metric = ManualDonationMetric::Kilo; - self.amount *= 1000.0; }; }); @@ -227,7 +226,11 @@ impl crate::disk::state::Xvb { // Set runtime_mode & runtime_manual_amount lock!(api).stats_priv.runtime_mode = self.mode.clone().into(); - lock!(api).stats_priv.runtime_manual_amount = self.amount; + if self.manual_donation_metric == ManualDonationMetric::Hash { + lock!(api).stats_priv.runtime_manual_amount = self.amount; + } else { + lock!(api).stats_priv.runtime_manual_amount = self.amount * 1000.0; + } } ui.add_space(space_h);