From 82c55601cc278896bf9db9314fc8924d18c16e6d Mon Sep 17 00:00:00 2001 From: mostafaei2002 Date: Tue, 11 Jun 2024 12:31:15 +0330 Subject: [PATCH] fix: slider max hashrate on kH/s mode --- src/app/panels/middle/xvb.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/panels/middle/xvb.rs b/src/app/panels/middle/xvb.rs index e2eff7e..add4d93 100644 --- a/src/app/panels/middle/xvb.rs +++ b/src/app/panels/middle/xvb.rs @@ -167,7 +167,7 @@ impl crate::disk::state::Xvb { ui.add_space(space_h); - let hashrate_xmrig = { + let mut hashrate_xmrig = { if lock!(gui_api_xmrig).hashrate_raw_15m > 0.0 { lock!(gui_api_xmrig).hashrate_raw_15m } else if lock!(gui_api_xmrig).hashrate_raw_1m > 0.0 { @@ -176,6 +176,10 @@ impl crate::disk::state::Xvb { lock!(gui_api_xmrig).hashrate_raw } }; + + if self.manual_donation_metric == ManualDonationMetric::Kilo { + hashrate_xmrig /= 1000.0; + } let slider_help_text = if self.mode == XvbMode::ManuallyDonate { XVB_MANUAL_SLIDER_DONATE_HELP