-
Notifications
You must be signed in to change notification settings - Fork 22
Description
π Objective
Currently, removing voters must be done manually via Voyager, integrate the removeVoters function from the DeVote smart contract into the admin interface, allowing admins to remove voters directly from the frontend.
π οΈ Tasks
π Backend Integration
Locate and use the removeVoters function from Frontend/hooks/use-contract.tsx.
Ensure correct interaction with the Starknet blockchain.
π₯οΈ Frontend Integration
Modify Frontend/app/admin/edit-proposal/[id]/page.tsx to trigger the voter removal function.
Ensure UI updates properly with loading states, success confirmation, and error messages.
π‘οΈ Error Handling & UX Enhancements
Implement loading indicators during pending transactions.
Display success messages when a voter is removed.
Handle errors (e.g., failed transactions, network errors).
β Acceptance Criteria
Admins can remove voters from the UI without using Voyager.
The transaction is properly sent to Starknet.
UI provides real-time feedback with success/error messages.
π¦ Resources:
Smart contract: remove_voters in Backend/src/devote.cairo.
Frontend hook: Frontend/hooks/use-contract.tsx
Frontend component: Frontend/app/admin/edit-proposal/[id]/page.tsx.