Skip to content

Commit

Permalink
fix query channel-upgrade subcommand to print the zero-value Upgrad…
Browse files Browse the repository at this point in the history
…e if upgrade not found

Signed-off-by: Masanori Yoshida <[email protected]>
  • Loading branch information
siburu committed Aug 27, 2024
1 parent a9f0af6 commit b0f9cc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/gogoproto/jsonpb"
clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"
chantypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types"
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
"github.com/hyperledger-labs/yui-relayer/config"
"github.com/hyperledger-labs/yui-relayer/core"
Expand Down Expand Up @@ -183,7 +184,7 @@ func queryChannelUpgrade(ctx *config.Context) *cobra.Command {
if err != nil {
return err
} else if res == nil {
return fmt.Errorf("failed to query for channel upgrade")
res = &chantypes.QueryUpgradeResponse{}
}

marshaler := jsonpb.Marshaler{}
Expand Down

0 comments on commit b0f9cc9

Please sign in to comment.