-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat: rage quit #219
base: old-main
Are you sure you want to change the base?
feat: rage quit #219
Conversation
|
Thanks for this! I'll review this tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Just run yarn lint
and commit changes to fix formatting. 😊
Motivation
This feature gives a contributor to a party the ability to rage quit(withdraw 100% of their contribution) before a crowdfund is finalized.
Solution
A
rageQuit
function has been created that increases a new variabletotalContributionsWithdrawn
, and removes the_contributionsByContributor
mapping for the user who quit. The function also returns the quitting user's total contribution from the crowdfund.previousTotalContributionsWithdrawn
has been added to theContribution
struct for proper accounting in the_getFinalContribution
function