Merge PR #5168: Add missing description field to MsgCreateValidator YAML output
This commit is contained in:
parent
bb6bed4ed3
commit
92ea174ea6
|
@ -116,6 +116,7 @@ func (msg *MsgCreateValidator) UnmarshalJSON(bz []byte) error {
|
|||
// custom marshal yaml function due to consensus pubkey
|
||||
func (msg MsgCreateValidator) MarshalYAML() (interface{}, error) {
|
||||
bs, err := yaml.Marshal(struct {
|
||||
Description Description
|
||||
Commission CommissionRates
|
||||
MinSelfDelegation sdk.Int
|
||||
DelegatorAddress sdk.AccAddress
|
||||
|
@ -123,6 +124,7 @@ func (msg MsgCreateValidator) MarshalYAML() (interface{}, error) {
|
|||
PubKey string
|
||||
Value sdk.Coin
|
||||
}{
|
||||
Description: msg.Description,
|
||||
Commission: msg.Commission,
|
||||
MinSelfDelegation: msg.MinSelfDelegation,
|
||||
DelegatorAddress: msg.DelegatorAddress,
|
||||
|
|
|
@ -179,6 +179,12 @@ func TestMsgMarshalYAML(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
|
||||
want := fmt.Sprintf(`|
|
||||
description:
|
||||
moniker: a
|
||||
identity: b
|
||||
website: c
|
||||
security_contact: d
|
||||
details: e
|
||||
commission:
|
||||
rate: "0.000000000000000000"
|
||||
max_rate: "0.000000000000000000"
|
||||
|
|
Loading…
Reference in New Issue