From 435016efca3f682a908536a1f0a4545f9fe0b8b4 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Wed, 5 Jun 2024 09:30:39 -0600 Subject: [PATCH 1/2] fix rpc client node info check --- packages/tendermint-rpc/src/comet38/adaptor/responses.ts | 2 +- packages/tendermint-rpc/src/tendermint37/adaptor/responses.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/tendermint-rpc/src/comet38/adaptor/responses.ts b/packages/tendermint-rpc/src/comet38/adaptor/responses.ts index d540481cbd..a83de829bf 100644 --- a/packages/tendermint-rpc/src/comet38/adaptor/responses.ts +++ b/packages/tendermint-rpc/src/comet38/adaptor/responses.ts @@ -599,7 +599,7 @@ function decodeNodeInfo(data: RpcNodeInfo): responses.NodeInfo { listenAddr: assertNotEmpty(data.listen_addr), network: assertNotEmpty(data.network), version: assertString(data.version), // Can be empty (https://github.com/cosmos/cosmos-sdk/issues/7963) - channels: assertNotEmpty(data.channels), + channels: assertString(data.channels), // can be empty moniker: assertNotEmpty(data.moniker), other: dictionaryToStringMap(data.other), protocolVersion: { diff --git a/packages/tendermint-rpc/src/tendermint37/adaptor/responses.ts b/packages/tendermint-rpc/src/tendermint37/adaptor/responses.ts index 70d13caf26..3b1f10e3a4 100644 --- a/packages/tendermint-rpc/src/tendermint37/adaptor/responses.ts +++ b/packages/tendermint-rpc/src/tendermint37/adaptor/responses.ts @@ -597,7 +597,7 @@ function decodeNodeInfo(data: RpcNodeInfo): responses.NodeInfo { listenAddr: assertNotEmpty(data.listen_addr), network: assertNotEmpty(data.network), version: assertString(data.version), // Can be empty (https://github.com/cosmos/cosmos-sdk/issues/7963) - channels: assertNotEmpty(data.channels), + channels: assertString(data.channels), // can be empty moniker: assertNotEmpty(data.moniker), other: dictionaryToStringMap(data.other), protocolVersion: { From e3c7d6f776a2a4958e4689164449c558dfee9bc0 Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Wed, 5 Jun 2024 10:09:24 -0600 Subject: [PATCH 2/2] docs: add changelog entry --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index beb3b36116..75b41a50e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to ## [Unreleased] +### Fixed + +- @cosmjs/tendermint-rpc: fix node info check to accept empty string on channels + field ([#1591]) + ## [0.32.3] - 2024-03-08 ### Changed