Skip to content

Commit

Permalink
fix consumer chains cli bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe committed Aug 29, 2024
1 parent 9af41b8 commit d9fbca8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/ccv/provider/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ func CmdConsumerChains() *cobra.Command {

req := &types.QueryConsumerChainsRequest{}

if args[0] != "" {
if len(args) >= 1 && args[0] != "" {
phase, err := strconv.ParseInt(args[0], 10, 32)
if err != nil {
return err
}
req.Phase = types.ConsumerPhase(phase)
}

if args[1] != "" {
if len(args) == 2 && args[1] != "" {
limit, err := strconv.ParseInt(args[1], 10, 32)
if err != nil {
return err
Expand Down

0 comments on commit d9fbca8

Please sign in to comment.