This commit is contained in:
aozhiwei 2023-08-26 09:03:43 +08:00
parent 55f0fb10f9
commit 61e9e5fe08

View File

@ -38,13 +38,8 @@ class StackingController extends BaseAuthedController {
$info['staking_value'] = 0; $info['staking_value'] = 0;
$info['maturity_quant'] = 0; $info['maturity_quant'] = 0;
foreach ($rows as $row) { foreach ($rows as $row) {
if (!$this->isTypeNft($info['type'], $row)) { if ($this->isTypeNft($info['type'], $row) &&
continue; $row['status'] == Stacking::STAKING_STATUS) {
}
switch ($info['type']) {
case self::PLANET_TYPE:
{
if ($row['status'] == Stacking::STAKING_STATUS) {
if ($row['start_time'] + $row['stake_time'] < myself()->_getNowTime()) { if ($row['start_time'] + $row['stake_time'] < myself()->_getNowTime()) {
$info['staked_quant'] += $row['stacked_num']; $info['staked_quant'] += $row['stacked_num'];
} else { } else {
@ -56,28 +51,6 @@ class StackingController extends BaseAuthedController {
} }
} }
} }
break;
case self::BADGE_TYPE:
{
if ($row['status'] == Stacking::STAKING_STATUS) {
if ($row['start_time'] + $row['stake_time'] < myself()->_getNowTime()) {
$info['staked_quant'] += $row['stacked_num'];
} else {
$info['maturity_quant'] += $row['stacked_num'];
}
if ($stakingMeta) {
$info['staking_value'] += $stakingMeta['stake_value'];
}
}
}
break;
case self::CEC_TYPE:
{
}
break;
}
}
} }
public function stacking() public function stacking()