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

Functionality to withdraw remaining funds post distributions. #30

Merged
merged 6 commits into from
Jul 10, 2024

Conversation

adityabhattad2021
Copy link
Contributor

Description:

Closes #21

This PR addresses the functionality to allow users to withdraw remaining tokens from the funding vault after the tally date has passed. The following changes have been implemented:

Smart Contract

  • Added a variable to keep track of the total funds distributed.
  • Introduced a mapping to record the amount deposited by each user.
  • Implemented a function to withdraw remaining funds post-distribution.
  • Added relevant getter functions to retrieve necessary data.
  • Included tests to ensure the new functionality works correctly.

Database

  • Added an isDistributed variable for the funding vault to track the distribution status.

API Routes

  • Added an API route to update the funding vault information, (for now to update the isDistributed field).

Frontend

  • Modified the "Distribute Funds" button to update the database after a successful smart contract call.
  • Added a button for users to withdraw remaining funds post-distribution.

UI Enhancements

  • Added two additional cards on the results page:
    1. Displaying the amount of funds actually distributed.
    2. Indicating whether the funds have been distributed.
  • Differentiated cards for actions post-tally and post-distribution to improve user experience.

@adityabhattad2021 adityabhattad2021 merged commit a11f6d0 into main Jul 10, 2024
1 check passed
@adityabhattad2021 adityabhattad2021 deleted the feat/add-withdraw-funds-post-distribution branch July 10, 2024 17:40
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

Successfully merging this pull request may close these issues.

Enable Token Withdrawal After Tally Date
1 participant