Fix height type
This commit is contained in:
parent
f9081acd12
commit
b80d5c39fc
@ -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> {
|
||||
|
||||
@ -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: {
|
||||
|
||||
2
packages/sdk/types/restclient.d.ts
vendored
2
packages/sdk/types/restclient.d.ts
vendored
@ -16,7 +16,7 @@ export interface BlockMeta {
|
||||
};
|
||||
}
|
||||
export interface BlockHeader {
|
||||
readonly height: number;
|
||||
readonly height: string;
|
||||
readonly chain_id: string;
|
||||
}
|
||||
export interface Block {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user