From 82371597c33072107cc439c5bb95ca516760e7a8 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Fri, 11 Nov 2022 11:49:42 -0600 Subject: [PATCH 1/2] Fix parse contract msg --- packages/cosmwasm-stargate/src/cosmwasmclient.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cosmwasm-stargate/src/cosmwasmclient.ts b/packages/cosmwasm-stargate/src/cosmwasmclient.ts index ba896663..ab357d9a 100644 --- a/packages/cosmwasm-stargate/src/cosmwasmclient.ts +++ b/packages/cosmwasm-stargate/src/cosmwasmclient.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { fromAscii, toHex } from "@cosmjs/encoding"; +import { fromUtf8, toHex } from "@cosmjs/encoding"; import { Uint53 } from "@cosmjs/math"; import { Account, @@ -415,7 +415,7 @@ export class CosmWasmClient { return { operation: operations[entry.operation], codeId: entry.codeId.toNumber(), - msg: JSON.parse(fromAscii(entry.msg)), + msg: JSON.parse(fromUtf8(entry.msg)), }; }); } From f7692776311cb18e203a9543c94dcceb2fcd43d1 Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Mon, 14 Nov 2022 10:58:32 -0600 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c77f8cc2..b8af0f84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ and this project adheres to ## [Unreleased] +### Fixed + +- @cosmjs/cosmwasm-stargate: Fix `ContractCodeHistory` decoding when msg contains non-printable ASCII ([#1320]). + +[#1320]: https://github.com/cosmos/cosmjs/pull/1320 + ## [0.29.3] - 2022-10-25 ### Added