Skip to content

Commit

Permalink
Merge pull request #1591 from public-awesome/fix-tendermint-check
Browse files Browse the repository at this point in the history
fix rpc client node info check
  • Loading branch information
webmaster128 committed Jun 6, 2024
2 parents 5c1ec56 + e3c7d6f commit f71cdc3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/tendermint-rpc/src/comet38/adaptor/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit f71cdc3

Please sign in to comment.