tendermint-rpc: Fix incorrect RPC types for v0.34

This commit is contained in:
willclarktech 2021-04-07 17:56:13 +02:00
parent 10ddc6282d
commit 3d46a76eaf
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7

View File

@ -263,7 +263,7 @@ interface RpcBlockId {
/** hex encoded */
readonly hash: string;
readonly parts: {
readonly total: string;
readonly total: number;
/** hex encoded */
readonly hash: string;
};
@ -273,7 +273,7 @@ function decodeBlockId(data: RpcBlockId): responses.BlockId {
return {
hash: fromHex(assertNotEmpty(data.hash)),
parts: {
total: Integer.parse(assertNotEmpty(data.parts.total)),
total: assertNotEmpty(data.parts.total),
hash: fromHex(assertNotEmpty(data.parts.hash)),
},
};
@ -296,8 +296,6 @@ interface RpcHeader {
readonly chain_id: string;
readonly height: string;
readonly time: string;
readonly num_txs: string;
readonly total_txs: string;
readonly last_block_id: RpcBlockId;