Skip to content

Commit

Permalink
Merge pull request #3408 from vegaprotocol/feature/2998-improve-propo…
Browse files Browse the repository at this point in the history
…sal-vote-api

Improve API to return vote balance and weight
  • Loading branch information
jeremyletang committed Apr 26, 2021
2 parents 5289b61 + c8e3151 commit 2cab3e0
Show file tree
Hide file tree
Showing 17 changed files with 987 additions and 397 deletions.
12 changes: 12 additions & 0 deletions events/vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ func (v *Vote) Value() types.Vote_Value {
return v.v.Value
}

// TotalGovernanceTokenBalance returns the total balance of token used for this
// vote
func (v *Vote) TotalGovernanceTokenBalance() uint64 {
return v.v.TotalGovernanceTokenBalance
}

// TotalGovernanceTokenWeight returns the total weight of token used for this
// vote
func (v *Vote) TotalGovernanceTokenWeight() string {
return v.v.TotalGovernanceTokenWeight
}

func (v Vote) Proto() types.Vote {
return v.v
}
Expand Down

0 comments on commit 2cab3e0

Please sign in to comment.