Commit f5f24cf7 authored by shajiaiming's avatar shajiaiming

fix

parent c5a9ccb8
......@@ -3,6 +3,7 @@
namespace console\controllers;
use common\models\psources\CoinIssueRevokeRecord;
use common\models\psources\CoinPlatformWithHold;
use Yii;
use yii\console\Controller;
use yii\helpers\ArrayHelper;
......@@ -63,9 +64,11 @@ class IssueChainTransferController extends Controller
return 0;
}
$node = Yii::$app->params['chain_nodes']['STO'];
$chain_service = new Chain33Service($node);
foreach ($model as $val) {
$platform = CoinPlatformWithHold::find()->select('platform')->where(['id' => $val->coin->chain_id])->one();
$node = Yii::$app->params['chain_nodes'][strtoupper($platform->platform)];
$chain_service = new Chain33Service($node);
//执行1.2构造
$result = $chain_service->createRawTokenFinishTx($val->coin->symbol, $val->coin->owner);
if (null != $result['error']) {
......@@ -79,7 +82,6 @@ class IssueChainTransferController extends Controller
$txHex = $result['result'];
$privkey = '8ac19c0b8858ccd6ed34e2bce0f11be2fc696e658d0b98fb1d3ef85ec5a3992c';
#$privkey = $val->coin->chain->private_key;
$expire = '1m';
//执行1.2签名
$signRawTx = $chain_service->signRawTx($privkey, $txHex, $expire);
......@@ -141,10 +143,11 @@ class IssueChainTransferController extends Controller
return 0;
}
$node = Yii::$app->params['chain_nodes']['STO'];
$service = new Chain33Service($node);
$current_time = time();
foreach ($model as $val) {
$platform = CoinPlatformWithHold::find()->select('platform')->where(['id' => $val->coin->chain_id])->one();
$node = Yii::$app->params['chain_nodes'][strtoupper($platform->platform)];
if (1 == $step) {
$result = $this->queryTransaction($node, $val->pre_send_transaction);
#$result = $service->QueryTransaction($val->pre_send_transaction);
......
This diff is collapsed.
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