Fix broken BlockResponse types
This commit is contained in:
@@ -218,12 +218,12 @@ export class CosmWasmConnection implements BlockchainConnection {
|
||||
|
||||
public async getBlockHeader(height: number): Promise<BlockHeader> {
|
||||
// tslint:disable-next-line: deprecation
|
||||
const { block_meta } = await this.restClient.blocks(height);
|
||||
const { block_id, block } = await this.restClient.blocks(height);
|
||||
return {
|
||||
id: block_meta.block_id.hash as BlockId,
|
||||
height: block_meta.header.height,
|
||||
time: new ReadonlyDate(block_meta.header.time),
|
||||
transactionCount: block_meta.header.num_txs,
|
||||
id: block_id.hash as BlockId,
|
||||
height: parseInt(block.header.height, 10),
|
||||
time: new ReadonlyDate(block.header.time),
|
||||
transactionCount: block.data.txs?.length || 0,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user