Commit fb5a0434 authored by shajiaiming's avatar shajiaiming

fix

parent 72a6e391
......@@ -241,7 +241,7 @@ class IssueChainTransferController extends Controller
CoinIssueCoin::updateAll(['status' => $status], [
'id' => $val->coin->id,
]);
if (CoinIssueCoin::TYPE_NO == $val->coin->type) {
if (CoinIssueCoin::TYPE_YES == $val->coin->type) {
$params = [
'name' => $val->coin->name,
'symbol' => $val->coin->symbol,
......@@ -356,11 +356,12 @@ class IssueChainTransferController extends Controller
public function syncCoin($params = [])
{
$model_coin = Coin::find()->where(['name' => $params['name'], 'platform' => $params['platform']])->one();
$model_coin = Coin::find()->where(['name' => $params['symbol'], 'platform' => $params['platform']])->one();
if (false == $model_coin) {
$model = new Coin();
$model->name = $params['symbol'];
$model->sid = $params['name'];
$model->nickname = ['ja' => '', 'en-US' => '', 'zh-CN' => ''];
$model->platform = $params['platform'];
$model->publish_count = $params['total'] * 1e8;
$model->chain = 'BTY';
......
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