Fix height type

This commit is contained in:
Simon Warta 2020-02-15 11:46:59 +01:00
parent f9081acd12
commit b80d5c39fc
3 changed files with 3 additions and 3 deletions

View File

@ -132,7 +132,7 @@ export class CosmWasmConnection implements BlockchainConnection {
public async height(): Promise<number> {
// tslint:disable-next-line: deprecation
const { block } = await this.restClient.blocksLatest();
return block.header.height;
return parseInt(block.header.height, 10);
}
public async getToken(searchTicker: TokenTicker): Promise<Token | undefined> {

View File

@ -34,7 +34,7 @@ export interface BlockMeta {
}
export interface BlockHeader {
readonly height: number;
readonly height: string;
readonly chain_id: string;
// TODO: add all of those
// header: {

View File

@ -16,7 +16,7 @@ export interface BlockMeta {
};
}
export interface BlockHeader {
readonly height: number;
readonly height: string;
readonly chain_id: string;
}
export interface Block {