Commit a16e6af6 authored by shajiaiming's avatar shajiaiming

fix

parent 1583468c
......@@ -198,12 +198,15 @@ class WalletChainController extends BaseController
public function syncCoin($params = [])
{
$model = new Coin();
$model->nickname = ['ja' => '', 'en-US' => '', 'zh-CN' => ''];
$model->name = $params['token'];
$model->platform = $params['platform'];
$model->chain = 'BTY';
$model->platform_id = 1;
$model->save();
$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'];
$model->platform = $params['platform'];
$model->chain = 'BTY';
$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