From 1d01f9f838af186d11e802cbaf826c6c73aa241f Mon Sep 17 00:00:00 2001 From: Jeremy Letang Date: Wed, 24 Apr 2024 18:19:44 +0100 Subject: [PATCH 1/2] fix: do not return error on non existing balance when checking for governance vote until ELS are checked Signed-off-by: Jeremy Letang --- core/governance/engine.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/governance/engine.go b/core/governance/engine.go index a2c8ca2bb6e..3a87d610727 100644 --- a/core/governance/engine.go +++ b/core/governance/engine.go @@ -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() { @@ -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 } From c2c78f2a455ada97cfeb983972c3ca0eca8afa2b Mon Sep 17 00:00:00 2001 From: Jeremy Letang Date: Wed, 24 Apr 2024 18:22:44 +0100 Subject: [PATCH 2/2] chore: update changelog Signed-off-by: Jeremy Letang --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c370191eb48..6f5c151881b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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