1
This commit is contained in:
parent
61e9e5fe08
commit
75b41c7ce4
@ -17,21 +17,28 @@ class StackingController extends BaseAuthedController {
|
|||||||
$info = array(
|
$info = array(
|
||||||
'total_staking_value' => '0',
|
'total_staking_value' => '0',
|
||||||
'daily_staking_value' => '0',
|
'daily_staking_value' => '0',
|
||||||
'planet' => array(),
|
'planet' => array(
|
||||||
'badge' => array(),
|
'type' => self::PLANET_TYPE,
|
||||||
'cec' => array(),
|
'is_open' => 1
|
||||||
|
),
|
||||||
|
'badge' => array(
|
||||||
|
'type' => self::BADGE_TYPE,
|
||||||
|
'is_open' => 1
|
||||||
|
),
|
||||||
|
'cec' => array(
|
||||||
|
'type' => self::CEC_TYPE,
|
||||||
|
'is_open' => 0
|
||||||
|
),
|
||||||
);
|
);
|
||||||
$rows = Stacking::all(myself()->_getAddress());
|
$rows = Stacking::all(myself()->_getAddress());
|
||||||
$this->fillStackingInfo($info['planet'], self::PLANET_TYPE, 1, $rows);
|
$this->fillStackingInfo($info['planet'], $rows);
|
||||||
$this->fillStackingInfo($info['badge'], self::BADGE_TYPE, 1, $rows);
|
$this->fillStackingInfo($info['badge'], $rows);
|
||||||
$this->fillStackingInfo($info['cec'], self::CEC_TYPE, 1, $rows);
|
$this->fillStackingInfo($info['cec'], $rows);
|
||||||
myself()->_rspData($info);
|
myself()->_rspData($info);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function fillStackingInfo(&$info, $type, $isOpen, $rows)
|
private function fillStackingInfo(&$info, $rows)
|
||||||
{
|
{
|
||||||
$info['type'] = $type;
|
|
||||||
$info['is_open'] = $isOpen;
|
|
||||||
$info['staked_quant'] = 0;
|
$info['staked_quant'] = 0;
|
||||||
$info['claim_rewards'] = 0;
|
$info['claim_rewards'] = 0;
|
||||||
$info['daily_rewards'] = 0;
|
$info['daily_rewards'] = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user