Skip to content

Commit f71cdc3

Browse files
authored
Merge pull request #1591 from public-awesome/fix-tendermint-check
fix rpc client node info check
2 parents 5c1ec56 + e3c7d6f commit f71cdc3

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- @cosmjs/tendermint-rpc: fix node info check to accept empty string on channels
12+
field ([#1591])
13+
914
## [0.32.3] - 2024-03-08
1015

1116
### Changed

packages/tendermint-rpc/src/comet38/adaptor/responses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ function decodeNodeInfo(data: RpcNodeInfo): responses.NodeInfo {
599599
listenAddr: assertNotEmpty(data.listen_addr),
600600
network: assertNotEmpty(data.network),
601601
version: assertString(data.version), // Can be empty (https://github.com/cosmos/cosmos-sdk/issues/7963)
602-
channels: assertNotEmpty(data.channels),
602+
channels: assertString(data.channels), // can be empty
603603
moniker: assertNotEmpty(data.moniker),
604604
other: dictionaryToStringMap(data.other),
605605
protocolVersion: {

packages/tendermint-rpc/src/tendermint37/adaptor/responses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ function decodeNodeInfo(data: RpcNodeInfo): responses.NodeInfo {
597597
listenAddr: assertNotEmpty(data.listen_addr),
598598
network: assertNotEmpty(data.network),
599599
version: assertString(data.version), // Can be empty (https://github.com/cosmos/cosmos-sdk/issues/7963)
600-
channels: assertNotEmpty(data.channels),
600+
channels: assertString(data.channels), // can be empty
601601
moniker: assertNotEmpty(data.moniker),
602602
other: dictionaryToStringMap(data.other),
603603
protocolVersion: {

0 commit comments

Comments
 (0)