Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
- [11158](https://github.com/vegaprotocol/vega/issues/11158) - resolve the quote asset for fee estimation in spot market.
- [11143](https://github.com/vegaprotocol/vega/issues/11143) - Add support for new asset proposal in batch governance proposal
- [11182](https://github.com/vegaprotocol/vega/issues/11182) - Remove reduce only restriction on spot markets stop orders.
- [11057](https://github.com/vegaprotocol/vega/issues/11057) - Allow market maker to vote on governance proposals with their equity like shares only.

### 🐛 Fixes

Expand Down
12 changes: 11 additions & 1 deletion core/governance/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,15 @@ func (e *Engine) canVote(
params *types.ProposalParameters,
party string,
) error {
// Here the error can only happen in case the party
// have no balances, which is not an error per se
// and we should keep going.
// This would allow us to go further in case a
// party is a market maker and they'd be voting
// with their equity like share.
voterTokens, err := getGovernanceTokens(e.accs, party)
if err != nil {
return err
voterTokens = num.UintZero()
}

if proposal.IsMarketUpdate() || proposal.IsSpotMarketUpdate() {
Expand All @@ -970,6 +976,10 @@ func (e *Engine) canVote(
return ErrVoterInsufficientTokens
}
} else {
// here the party had no balance, return existing error
if err != nil {
return err
}
if voterTokens.LT(params.MinVoterBalance) {
return ErrVoterInsufficientTokens
}
Expand Down