Commit a45e02cc authored by shajiaiming's avatar shajiaiming

修复已知问题

parent 3d2f449f
......@@ -80,16 +80,16 @@ class WalletController extends BaseController
$code = 0;
$msg = 'success';
$platform_id = Yii::$app->request->get('platform_id', '');
$address = Yii::$app->request->get('address', '');
if(empty($platform_id) || empty($address)){
$msg = '参数错误';
$token = Yii::$app->request->get('address', '');
if(empty($platform_id) || empty($token)){
$msg = '参数不能为空';
$code = -1;
$data = null;
goto doEnd;
}
$service = new Chain33Service();
$address[] = $address;
$node = Yii::$app->params['chain_nodes']['STO'];
$service = new Chain33Service($node);
$address[] = $token;
$execer = 'coins';
$result = $service->getBalance($address, $execer);
if (0 !== $result['code'] && null == $result['error']) {
......
......@@ -27,7 +27,8 @@ class IssueCoinController extends Controller
echo date('Y-m-d H:i:s') . '暂无发行任务' . PHP_EOL;
return 0;
}
$chain_service = new Chain33Service();
$node = Yii::$app->params['chain_nodes']['STO'];
$chain_service = new Chain33Service($node);
foreach ($issue_coin_model as $issue_coin) {
go(function () use ($issue_coin, $chain_service) {
\Co::sleep(0.5);
......@@ -79,7 +80,8 @@ class IssueCoinController extends Controller
return 0;
}
$chain_service = new Chain33Service();
$node = Yii::$app->params['chain_nodes']['STO'];
$chain_service = new Chain33Service($node);
foreach ($issue_coin_model as $issue_coin) {
go(function () use ($issue_coin, $chain_service) {
\Co::sleep(0.5);
......
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