fix: Prevent election creation with past start dates#211
fix: Prevent election creation with past start dates#211sai-suraj143 wants to merge 1 commit intoAOSSIE-Org:mainfrom
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdded runtime validations to the election creation flow: a wallet (window.ethereum) presence check in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Previously, the election creation form allowed users to select a "Start Date" in the past. The form would fail silently (no election created, no error shown). This PR adds a validation check to ensure
startTime >= CurrentTime. If a past date is selected, a Toast error is displayed to the user.Type of Change
How Has This Been Tested?
Checklist:
Closes #210
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.