Skip to content

Commit

Permalink
Merge pull request #159 from hangts/master
Browse files Browse the repository at this point in the history
#add originalTxs in queryBlock
  • Loading branch information
kaifei Hu authored Mar 18, 2021
2 parents 988225a + 37c631c commit 657c691
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions dist/src/modules/tendermint.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ var Tendermint = /*#__PURE__*/function () {
txs.forEach(function (msg) {
decodedTxs.push(_this.client.protobuf.deserializeTx(msg));
});
res.block.data.originalTxs = res.block.data.txs;
res.block.data.txs = decodedTxs;
}

Expand Down
1 change: 1 addition & 0 deletions src/modules/tendermint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class Tendermint {
this.client.protobuf.deserializeTx(msg)
);
});
res.block.data.originalTxs = res.block.data.txs;
res.block.data.txs = decodedTxs;
}
return res as types.Block;
Expand Down
2 changes: 1 addition & 1 deletion test/tendermint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Tendermint Tests', () => {
'query block by height',
async () => {
await BaseTest.getClient()
.tendermint.queryBlock(196)
.tendermint.queryBlock(1755803)
.then(res => {
console.log(JSON.stringify(res));
})
Expand Down

0 comments on commit 657c691

Please sign in to comment.