Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MsgEditValidator json contains uppercase letter #5336

Closed
4 tasks
whitefen opened this issue Nov 22, 2019 · 0 comments · Fixed by #5342
Closed
4 tasks

MsgEditValidator json contains uppercase letter #5336

whitefen opened this issue Nov 22, 2019 · 0 comments · Fixed by #5342

Comments

@whitefen
Copy link

whitefen commented Nov 22, 2019

Summary of Bug

The field Description of MsgEditValidator is marshaled to json as 'Description' which contains an uppercase letter. Other fields are all lowercase.

{
    "type":"cosmos-sdk/MsgEditValidator",
    "value":{
        "Description":{
            "moniker":"nodeAAA",
            "identity":"CF1FAAA36A78BE02",
            "website":"www.example.com",
            "details":"DETAILS"
        },
        "address":"xxx",
        "commission_rate":null,
        "min_self_delegation":null
    }
}

Version

lastest

Steps to Reproduce

https://github.com/cosmos/cosmos-sdk/blob/master/x/staking/types/msg.go#L185

Suggestion

Add json tag.

type MsgEditValidator struct {
	Description `json:"description" yaml:"description"`
	ValidatorAddress sdk.ValAddress `json:"address" yaml:"address"`
	...
}

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@fedekunze fedekunze self-assigned this Nov 26, 2019
fedekunze added a commit that referenced this issue Dec 3, 2019
* add json tag to MsgEditValidator; closes #5336

* changelog

* Apply suggestions from code review

Co-Authored-By: Alessio Treglia <[email protected]>

* format

* changelog minor fix
xiangjianmeng pushed a commit to xiangjianmeng/cosmos-sdk that referenced this issue Dec 18, 2019
* add json tag to MsgEditValidator; closes cosmos#5336

* changelog

* Apply suggestions from code review

Co-Authored-By: Alessio Treglia <[email protected]>

* format

* changelog minor fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants