Update asset_transfer_ledger_chaincode.js

fabric 2.x use **txId ** in res.value

Signed-off-by: yuppieghost <wjj315315@gmail.com>
This commit is contained in:
yuppieghost 2021-06-21 17:47:38 +08:00
parent 1cd71fd26a
commit fb56261f8f

View file

@ -320,7 +320,7 @@ class Chaincode extends Contract {
let jsonRes = {}; let jsonRes = {};
console.log(res.value.value.toString('utf8')); console.log(res.value.value.toString('utf8'));
if (isHistory && isHistory === true) { if (isHistory && isHistory === true) {
jsonRes.TxId = res.value.tx_id; jsonRes.TxId = res.value.txId;
jsonRes.Timestamp = res.value.timestamp; jsonRes.Timestamp = res.value.timestamp;
try { try {
jsonRes.Value = JSON.parse(res.value.value.toString('utf8')); jsonRes.Value = JSON.parse(res.value.value.toString('utf8'));