Commit a16e6af6 authored by shajiaiming's avatar shajiaiming

fix

parent 1583468c
......@@ -198,6 +198,8 @@ class WalletChainController extends BaseController
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->nickname = ['ja' => '', 'en-US' => '', 'zh-CN' => ''];
$model->name = $params['token'];
......@@ -206,4 +208,5 @@ class WalletChainController extends BaseController
$model->platform_id = 1;
$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