1
This commit is contained in:
parent
61e9e5fe08
commit
75b41c7ce4
@ -17,21 +17,28 @@ class StackingController extends BaseAuthedController {
|
||||
$info = array(
|
||||
'total_staking_value' => '0',
|
||||
'daily_staking_value' => '0',
|
||||
'planet' => array(),
|
||||
'badge' => array(),
|
||||
'cec' => array(),
|
||||
'planet' => array(
|
||||
'type' => self::PLANET_TYPE,
|
||||
'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());
|
||||
$this->fillStackingInfo($info['planet'], self::PLANET_TYPE, 1, $rows);
|
||||
$this->fillStackingInfo($info['badge'], self::BADGE_TYPE, 1, $rows);
|
||||
$this->fillStackingInfo($info['cec'], self::CEC_TYPE, 1, $rows);
|
||||
$this->fillStackingInfo($info['planet'], $rows);
|
||||
$this->fillStackingInfo($info['badge'], $rows);
|
||||
$this->fillStackingInfo($info['cec'], $rows);
|
||||
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['claim_rewards'] = 0;
|
||||
$info['daily_rewards'] = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user