Skip to content

Commit

Permalink
fix: add omitempty in governance (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
brucexc authored Oct 17, 2024
1 parent c064530 commit 66bebf2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions schema/metadata/governance.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ func (t GovernanceProposal) Type() schema.Type {

type GovernanceProposal struct {
ID string `json:"id"`
Body string `json:"body"`
StartBlock string `json:"start_block"`
EndBlock string `json:"end_block"`
Options []string `json:"options"`
Link string `json:"link"`
Body string `json:"body,omitempty"`
StartBlock string `json:"start_block,omitempty"`
EndBlock string `json:"end_block,omitempty"`
Options []string `json:"options,omitempty"`
Link string `json:"link,omitempty"`
}

var _ Metadata = (*GovernanceVote)(nil)
Expand All @@ -33,8 +33,8 @@ var _ Metadata = (*GovernanceVoteAction)(nil)

type GovernanceVote struct {
Action GovernanceVoteAction `json:"action"`
Count uint64 `json:"count"`
Reason string `json:"reason"`
Count uint64 `json:"count,omitempty"`
Reason string `json:"reason,omitempty"`
Proposal GovernanceProposal `json:"token"`
}

Expand Down

0 comments on commit 66bebf2

Please sign in to comment.