Update asset_transfer_ledger_chaincode.js (#452)

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

Signed-off-by: yuppieghost <wjj315315@gmail.com>
This commit is contained in:
yuppieghost 2021-07-06 15:36:17 +08:00 committed by GitHub
parent 5e933c10cb
commit 04806b604d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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