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

fix: vote credits input bug #224

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Conversation

kittybest
Copy link
Contributor

@kittybest kittybest commented Jul 22, 2024

Description

  • we only allow user to input a number smaller than the initialVoiceCredits in the ballot input field, however
    1. if the user not registered, he/she can still go to the ballot page or add votes on project page, but actually the initialVoiceCredits is 0 due to they not signed up yet, so the input field works weird
    2. even if the user registered, the input field limitation is not applied to the add votes field on project page

so in this PR, we do

  • prevent user from going to ballot page if not during the voting period
  • prevent user from going to ballot page if not registered
  • prevent user enter a vote amount larger than the initialVoiceCredits on the projects page
  • add styling to the input field if the amount exceeds, instead of not allow user to input
  • prevent user submit ballot if exceeds the initialVoiceCredits

Related Issues
close #223, #185

Copy link

vercel bot commented Jul 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
maci-rpgf ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2024 6:27pm

@kittybest kittybest force-pushed the fix/prevent-spent-over branch from 8a8fcc2 to 6cbaaab Compare July 22, 2024 18:25
@kittybest kittybest marked this pull request as ready for review July 22, 2024 18:26
Copy link
Collaborator

@ctrlc03 ctrlc03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link
Collaborator

@0xmad 0xmad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kittybest thanks!

@kittybest kittybest merged commit 11399e5 into feat/design-ui Jul 23, 2024
9 checks passed
@kittybest kittybest deleted the fix/prevent-spent-over branch July 23, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants