From a186e56f3e995c648bf8c56c93f2d506d380fd0e Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Tue, 5 Sep 2023 18:44:10 +0800 Subject: [PATCH] 1 --- webapp/controller/ComputingPowerController.class.php | 4 ++-- webapp/services/HashRateService.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/webapp/controller/ComputingPowerController.class.php b/webapp/controller/ComputingPowerController.class.php index 65641dce..d453fcb6 100644 --- a/webapp/controller/ComputingPowerController.class.php +++ b/webapp/controller/ComputingPowerController.class.php @@ -157,9 +157,9 @@ class ComputingPowerController extends BaseAuthedController $this->_rspErr(1, 'There are no available crystals'); return ; } - $rate = Parameter::getVal('cec_exchange_rate',10); +// $rate = Parameter::getVal('cec_exchange_rate',10); $cecVal = Staking::getStakingTotalValue(); - $crystalNum = max(0,floor($cecVal / $rate / $paramEd[0]) * $paramEd[1]); + $crystalNum = max(0,floor($cecVal / $paramEd[0]) * $paramEd[1]); } } diff --git a/webapp/services/HashRateService.php b/webapp/services/HashRateService.php index 17fb7a48..ffb817b4 100644 --- a/webapp/services/HashRateService.php +++ b/webapp/services/HashRateService.php @@ -82,16 +82,16 @@ class HashRateService extends BaseService case 4 : { // 质压总价值 $param = explode(':',$hashRateMeta['parameter']); - $rate = Parameter::getVal('cec_exchange_rate',10); +// $rate = Parameter::getVal('cec_exchange_rate',10); $cecVal = Staking::getStakingTotalValue(); $crystalDto['total'] = array( - 'param1' => floatval($cecVal / $rate), + 'param1' => floatval($cecVal ), ); $recordDb = CrystalRecord::getNewestRecordOne($crystalMeta['id']); if ($recordDb && myself()->_getNowDaySeconds() == myself()->_getDaySeconds($recordDb['createtime'])){ $crystalDto['pending'] = 0; }else{ - $totalNum = max(0,floor($cecVal / $rate / $param[0]) * $param[1]); + $totalNum = max(0,floor($cecVal / $param[0]) * $param[1]); $crystalDto['pending'] = intval($totalNum); } $crystalDto['state'] = $crystalDto['pending'] > 0 ? self::RECEIVED_STATE : self::NONE_STATE;