display as ETH
This commit is contained in:
parent
76ebc589a6
commit
faa1912f7e
|
@ -323,6 +323,8 @@ class ApiV1Controller extends Controller
|
|||
public function page_mining(Request $request)
|
||||
{
|
||||
$pool_data = $this->_pool_data();
|
||||
$price = $this->get_cache_eth_price();
|
||||
$pool_data['totalOutput'] = floatval(bcdiv($pool_data['totalOutput'], $price, 4));
|
||||
|
||||
$kvs = Redis::hGetAll(self::K_ROBOTS);
|
||||
|
||||
|
@ -405,6 +407,8 @@ class ApiV1Controller extends Controller
|
|||
// 用户帐号概况
|
||||
protected function _user_account_info($address)
|
||||
{
|
||||
$price = $this->get_cache_eth_price();
|
||||
|
||||
// 余额
|
||||
$res = User::where('address', $address)
|
||||
->pluck('balance');
|
||||
|
@ -417,7 +421,7 @@ class ApiV1Controller extends Controller
|
|||
->where('status', Base::BALANCE_STAKING_DAILY_REVENUE)
|
||||
->sum('money');
|
||||
|
||||
$output = Base::ffixed($output);
|
||||
$output = Base::ffixed(bcdiv($output, $price, 4));
|
||||
// 提现
|
||||
$withdrawal = Withdrawal::where('address', $address)
|
||||
->sum('balance');
|
||||
|
@ -428,10 +432,6 @@ class ApiV1Controller extends Controller
|
|||
|
||||
public function test()
|
||||
{
|
||||
// self::prepare_data_sources();
|
||||
// $this->_user_account_info('0x19b7A3F7C451dE45a5b4C05a2E3C2849cD47A1de');
|
||||
// $a = $this->_articles();
|
||||
// var_dump($a);
|
||||
echo ThirdApi::getPrice(ThirdApi::ID_ETH);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue