From 9ce5241b9ba39879356c61b077c259f88cea1091 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 15 Dec 2020 11:31:10 +0000 Subject: [PATCH] cosmwasm-stargate: Use DateTime to encode times --- packages/cosmwasm-stargate/src/cosmwasmclient.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cosmwasm-stargate/src/cosmwasmclient.ts b/packages/cosmwasm-stargate/src/cosmwasmclient.ts index 870c2554..902f40d4 100644 --- a/packages/cosmwasm-stargate/src/cosmwasmclient.ts +++ b/packages/cosmwasm-stargate/src/cosmwasmclient.ts @@ -30,6 +30,7 @@ import { adaptor34, broadcastTxCommitSuccess, Client as TendermintClient, + DateTime, QueryString, } from "@cosmjs/tendermint-rpc"; import { assert } from "@cosmjs/utils"; @@ -114,7 +115,7 @@ export class CosmWasmClient { }, height: response.block.header.height, chainId: response.block.header.chainId, - time: response.block.header.time.toISOString(), + time: DateTime.encode(response.block.header.time), }, txs: response.block.txs, };