1
This commit is contained in:
parent
c1fac3779c
commit
972381ba07
@ -41,6 +41,21 @@ class Staking extends BaseModel {
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function getStakingTotalValue()
|
||||
{
|
||||
$totalValue = 0;
|
||||
$rows = self::all(myself()->_getAddress());
|
||||
foreach ($rows as $row) {
|
||||
$stakingDto = self::toDto($row);
|
||||
if ($stakingDto['status'] == Stacking::STAKING_STATUS) {
|
||||
if ($stakingDto['remain_days'] <= 0) {
|
||||
$totalValue += $stakingDto['ceg_value'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $totalValue;
|
||||
}
|
||||
|
||||
public static function staked721($data, $netId)
|
||||
{
|
||||
foreach ($data['infos'] as $info) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user