diff --git a/pkg/governance/api.go b/pkg/governance/api.go index 17d5f84..4b778f4 100644 --- a/pkg/governance/api.go +++ b/pkg/governance/api.go @@ -6,10 +6,9 @@ import ( ) type Space struct { - Name string `json:"name"` - Key string `json:"key"` - Network string `json:"network"` - Symbol string `json:"symbol"` + Name string `json:"name"` + Key string `json:"key,omitempty"` + Symbol string `json:"symbol"` } func listSpaces() (spaces map[string]*Space, err error) { @@ -20,6 +19,10 @@ func listSpaces() (spaces map[string]*Space, err error) { return nil, err } + for k, space := range result { + space.Key = k + } + return result, nil } @@ -68,7 +71,7 @@ type ProposalIPFSMsg struct { } type ProposalVoteMsgPayload struct { - Choice int `json:"choice"` + Choice int `json:"choice,string"` Proposal string `json:"proposal"` } @@ -143,6 +146,7 @@ type NewProposalJson struct { } `json:"params"` } `json:"strategies"` } `json:"metadata"` + MaxCanSelect int `json:"maxCanSelect"` } `json:"payload"` } diff --git a/pkg/governance/cli.go b/pkg/governance/cli.go index a87688a..485dacb 100644 --- a/pkg/governance/cli.go +++ b/pkg/governance/cli.go @@ -24,10 +24,10 @@ func PrintListSpace() error { table := tablewriter.NewWriter(os.Stdout) table.SetBorder(false) - table.SetHeader([]string{"Key", "Network", "Name"}) + table.SetHeader([]string{"Key", "Name"}) for key, space := range spaces { - table.Append([]string{key, space.Network, space.Name}) + table.Append([]string{key, space.Name}) } table.Render() @@ -135,7 +135,8 @@ var proposalTemplate = []byte(`{ } } ] - } + }, + "maxCanSelect": 1 } }`)