Commit 7ccca6a6 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/issue_coin' into 'master'

fix See merge request !298
parents ef9fc724 0aa4a877
...@@ -198,6 +198,8 @@ class WalletChainController extends BaseController ...@@ -198,6 +198,8 @@ class WalletChainController extends BaseController
public function syncCoin($params = []) public function syncCoin($params = [])
{ {
$model_coin = Coin::find()->where(['name' => $params['token'], 'platform' => $params['platform'], 'chain' => 'BTY'])->one();
if (empty($model_coin)) {
$model = new Coin(); $model = new Coin();
$model->nickname = ['ja' => '', 'en-US' => '', 'zh-CN' => '']; $model->nickname = ['ja' => '', 'en-US' => '', 'zh-CN' => ''];
$model->name = $params['token']; $model->name = $params['token'];
...@@ -206,4 +208,5 @@ class WalletChainController extends BaseController ...@@ -206,4 +208,5 @@ class WalletChainController extends BaseController
$model->platform_id = 1; $model->platform_id = 1;
$model->save(); $model->save();
} }
}
} }
\ No newline at end of file
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