Commit f6911901 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/optimize' into 'master'

Feature/optimize See merge request !86
parents 1a2f737a 66406875
...@@ -348,6 +348,7 @@ class CoinController extends BaseController ...@@ -348,6 +348,7 @@ class CoinController extends BaseController
$platform_with_hold = CoinPlatformWithHold::getRecord($platform); $platform_with_hold = CoinPlatformWithHold::getRecord($platform);
$des = Yii::$app->des; $des = Yii::$app->des;
$platform_with_hold['private_key'] = $des->encrypt($platform_with_hold['private_key']); $platform_with_hold['private_key'] = $des->encrypt($platform_with_hold['private_key']);
$platform_with_hold['coins_name'] = '';
return ['code' => 0, 'data' => $platform_with_hold]; return ['code' => 0, 'data' => $platform_with_hold];
} }
$platform_with_hold = CoinPlatformWithHold::getRecord($platform); $platform_with_hold = CoinPlatformWithHold::getRecord($platform);
...@@ -358,10 +359,13 @@ class CoinController extends BaseController ...@@ -358,10 +359,13 @@ class CoinController extends BaseController
$platform_with_hold['exer'] = 'user.p.' . $platform . '.token'; $platform_with_hold['exer'] = 'user.p.' . $platform . '.token';
$platform_with_hold['tokensymbol'] = $coin_name; $platform_with_hold['tokensymbol'] = $coin_name;
$platform_with_hold['fee'] = 0; $platform_with_hold['fee'] = 0;
$coins_model = Coin::find()->select('name')->where(['platform' => $platform, 'treaty' => 2])->asArray()->one();
$platform_with_hold['coins_name'] = empty($coins_model) ? '' : $coins_model['name'];
} else { } else {
$platform_with_hold['exer'] = 'user.p.' . $platform . '.coins'; $platform_with_hold['exer'] = 'user.p.' . $platform . '.coins';
$platform_with_hold['tokensymbol'] = $platform . '.coins'; $platform_with_hold['tokensymbol'] = $platform . '.coins';
$platform_with_hold['fee'] = (float)sprintf("%0.4f", (double)$platform_with_hold['fee']); $platform_with_hold['fee'] = (float)sprintf("%0.4f", (double)$platform_with_hold['fee']);
$platform_with_hold['coins_name'] = '';
} }
$service = new Chain33Business(); $service = new Chain33Business();
$result = $service->getProperFee(); $result = $service->getProperFee();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment