Commit db6b650c authored by shajiaiming's avatar shajiaiming

修复已知问题

parent f3648d20
......@@ -192,7 +192,7 @@ class IssueCoinController extends BaseController
$params = [
'pre_create_tx' => $pre_create_tx,
'pre_send_transaction' => $pre_send_transaction,
'pre_query_transaction' => 'standby',
'pre_query_transaction' => 'success',
'finish_tx' => 'standby',
'finish_send_transaction' => 'standby',
'finish_query_transaction' => 'standby',
......
......@@ -82,8 +82,8 @@ class IssueChainTransferController extends Controller
}
$txHex = $result['result'];
$privkey = '72c3879f1f9b523f266a9545b69bd41c0251483a93e21e348e85118afe17a5e21';
#$privkey = $val->coin->chain->private_key;
#$privkey = '72c3879f1f9b523f266a9545b69bd41c0251483a93e21e348e85118afe17a5e21';
$privkey = $val->coin->chain->private_key;
$expire = '1m';
//执行1.2签名
$signRawTx = $chain_service->signRawTx($privkey, $txHex, $expire);
......@@ -128,11 +128,11 @@ class IssueChainTransferController extends Controller
public function actionQueryTransaction($step)
{
if (1 == $step) {
$model = CoinIssueChainRecord::find()->where(['<>', 'pre_send_transaction', 'standby'])->all();
$model = CoinIssueChainRecord::find()->where(['pre_query_transaction' => 'standby'])->all();
}
if (2 == $step) {
$model = CoinIssueChainRecord::find()->where(['pre_send_transaction' => 'success'])->andWhere(['<>', 'finish_send_transaction', 'standby'])->all();
$model = CoinIssueChainRecord::find()->where(['pre_query_transaction' => 'success'])->andWhere(['<>', 'finish_send_transaction', 'standby'])->all();
}
if (false == $model) {
......@@ -140,7 +140,7 @@ class IssueChainTransferController extends Controller
return 0;
}
$node = \Yii::$app->params['chain_parallel']['primary'];
$node = Yii::$app->params['chain_nodes']['STO'];
$service = new Chain33Service($node);
foreach ($model as $val) {
if (1 == $step) {
......@@ -167,7 +167,7 @@ class IssueChainTransferController extends Controller
foreach ($result['result']['receipt']['logs'] as $log) {
if (isset($log['tyName']) && 'LogErr' == $log['tyName']) {
$data = [
'finish_query_transaction' => $log['tyName']
'finish_query_transaction' => $log['log']
];
break;
}
......@@ -192,7 +192,7 @@ class IssueChainTransferController extends Controller
]);
}
//查询后,交易成功
if ($status = CoinIssueCoin::SUCCESS_ISSUE) {
if ($status == CoinIssueCoin::SUCCESS_ISSUE) {
CoinIssueCoin::updateAll(['status' => $status, 'charge_pay' => CoinIssueCoin::SUCCESS_PAY], [
'id' => $val->coin->id,
]);
......
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