Skip to content

CLI: validator-outstanding-rewards #4493

Closed
@alexanderbez

Description

Summary of Bug

$ gaiacli query distr validator-outstanding-rewards
ERROR: {"codespace":"sdk","code":6,"message":"incorrectly formatted request data; UnmarshalJSON cannot decode empty bytes"} 

The command isn't implemented correctly at all. The command should take as input a validator address and properly create the query params.

Current:

			route := fmt.Sprintf("custom/%s/validator_outstanding_rewards", queryRoute)
			res, err := cliCtx.QueryWithData(route, []byte{})
			if err != nil {
				return err
			}

Should be:

			route := fmt.Sprintf("custom/%s/validator_outstanding_rewards", queryRoute)
			res, err := cliCtx.QueryWithData(route, paramBytes)
			if err != nil {
				return err
			}

We really need to improve our CLI testing....

Version

5f9c3fdf88952ea43316f1a18de572e7ae3c13f6


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions