diff --git a/webapp/controller/StakingController.class.php b/webapp/controller/StakingController.class.php index 62e008be..6bf967a7 100644 --- a/webapp/controller/StakingController.class.php +++ b/webapp/controller/StakingController.class.php @@ -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;