This commit is contained in:
aozhiwei 2024-08-06 16:20:05 +08:00
parent d4120df25c
commit 101bab3142

View File

@ -377,6 +377,7 @@ class Staking extends BaseModel {
'pool_size' => $poolSize,
'total_staking_value' => '0',
'daily_staking_value' => '0',
'total_rewards' => 0,
'planet' => array(
'type' => self::PLANET_TYPE,
'is_open' => 1
@ -393,7 +394,7 @@ class Staking extends BaseModel {
self::fillStakingInfo($info, 'planet', $rows);
self::fillStakingInfo($info, 'badge', $rows);
self::fillStakingInfo($info, 'cec', $rows);
$userHash[$address] = $info['total_staking_value'];
$userHash[$address] = $info['total_rewards'];
}
return $userHash;
}
@ -419,10 +420,11 @@ class Staking extends BaseModel {
}
$stackingInfo['staked_quant'] += $stakingDto['stacked_num'];
$stackingInfo['staking_value'] += $stakingDto['cec_value'];
//$info['total_staking_value'] += $stakingDto['cec_value'] + $stakingDto['total_rewards'];
$info['total_staking_value'] += $stakingDto['cec_value'] + $stakingDto['total_rewards'];
} else {
$stackingInfo['claim_rewards'] += $stakingDto['total_rewards'];
$info['total_staking_value'] += $stakingDto['cec_value'] + $stakingDto['total_rewards'];
//$info['total_staking_value'] += $stakingDto['cec_value'] + $stakingDto['total_rewards'];
$info['total_rewards'] += $stakingDto['total_rewards'];
}
}
}