tendermint-rpc: Update block version type

This commit is contained in:
willclarktech 2020-10-14 17:58:55 +02:00
parent 324cb5c745
commit 05bcfa2e90
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7

View File

@ -271,13 +271,13 @@ function decodeBlockId(data: RpcBlockId): responses.BlockId {
interface RpcBlockVersion {
readonly block: IntegerString;
readonly app: IntegerString;
readonly app?: IntegerString;
}
function decodeBlockVersion(data: RpcBlockVersion): responses.Version {
return {
block: Integer.parse(data.block),
app: Integer.parse(data.app),
app: Integer.parse(data.app ?? 0),
};
}