Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More descriptive error voting for >10 val groups #41

Open
jmrossy opened this issue May 7, 2021 · 2 comments
Open

More descriptive error voting for >10 val groups #41

jmrossy opened this issue May 7, 2021 · 2 comments

Comments

@jmrossy
Copy link
Owner

jmrossy commented May 7, 2021

Feature Description

The limit is 10: https://github.com/celo-org/celo-monorepo/blob/master/packages/protocol/contracts/governance/Election.sol#L260

The current error is unclear (generic tx error)

@ghost
Copy link

ghost commented Aug 6, 2021

So by more descriptive you mean concatenate the number after the msg, the limit being maxNumGroupsVotedFor? Something like: "Voted for too many groups, please limit number of groups to 10(let's say)"?

@jmrossy
Copy link
Owner Author

jmrossy commented Aug 6, 2021

So by more descriptive you mean concatenate the number after the msg, the limit being maxNumGroupsVotedFor? Something like: "Voted for too many groups, please limit number of groups to 10(let's say)"?

Yeah something like that. We should add a condition in the validate method to catch this even before the user attempts the tx: https://github.com/celo-tools/celo-web-wallet/blob/master/src/features/validators/stakeToken.ts#L39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant