From 4470efbeda6869677a59123d9228b861d666b2df Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sat, 15 Feb 2020 16:02:58 +0100 Subject: [PATCH] Use CosmWasmClient.getBlock --- packages/bcp/src/cosmwasmconnection.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/bcp/src/cosmwasmconnection.ts b/packages/bcp/src/cosmwasmconnection.ts index 53d415e5..25122b27 100644 --- a/packages/bcp/src/cosmwasmconnection.ts +++ b/packages/bcp/src/cosmwasmconnection.ts @@ -130,8 +130,7 @@ export class CosmWasmConnection implements BlockchainConnection { } public async height(): Promise { - // tslint:disable-next-line: deprecation - const { block } = await this.restClient.blocksLatest(); + const { block } = await this.cosmWasmClient.getBlock(); return parseInt(block.header.height, 10); } @@ -217,8 +216,7 @@ export class CosmWasmConnection implements BlockchainConnection { } public async getBlockHeader(height: number): Promise { - // tslint:disable-next-line: deprecation - const { block_id, block } = await this.restClient.blocks(height); + const { block_id, block } = await this.cosmWasmClient.getBlock(height); return { id: block_id.hash as BlockId, height: parseInt(block.header.height, 10),