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: Ensure you can reclaim your stakes even if you staked the losing side #4180

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rumzledz
Copy link
Contributor

@rumzledz rumzledz commented Jan 24, 2025

Description

Thanks to @jakubcolony for helping me with the painful debugging process... which turned out to require a very straightforward fix 😅

We had this logic in the saga that incorrectly prevents you from claiming your stakes. A little tweak was needed in order to allow all stakers to reclaim their tokens.

reclaim

Testing

  1. Install the Reputation extension
  2. As leela, create a Simple Payment motion using the Reputation decision method
  3. As leela, during the Staking phase, Oppose and fully stake it
  4. Copy the URL
  5. Open an incognito window and connect amy's wallet
  6. As amy, visit the URL you just copied
  7. As amy, Support and fully stake it
  8. Go back to leela's window
  9. Reload the page
  10. During the Voting phase, submit a Support vote
  11. Reveal your vote
  12. Finalise the motion
  13. Reclaim your stakes
  14. It could take a while but verify that the reclaim action successfully finishes

Resolves #4158

@rumzledz rumzledz self-assigned this Jan 24, 2025
@rumzledz rumzledz marked this pull request as ready for review January 24, 2025 14:52
@rumzledz rumzledz requested a review from a team as a code owner January 24, 2025 14:52
@rumzledz rumzledz changed the title Fix: Ensure claims can be reclaimed even if you staked the losing side Fix: Ensure stakes can be reclaimed even if you staked the losing side Jan 24, 2025
@rumzledz rumzledz changed the title Fix: Ensure stakes can be reclaimed even if you staked the losing side Fix: Ensure you can reclaim your stakes even if you staked the losing side Jan 24, 2025
@rumzledz rumzledz force-pushed the fix/4158-return-stakes branch from fc5fe65 to 50b16cf Compare January 24, 2025 14:54
Copy link
Contributor

@davecreaser davecreaser left a comment

Choose a reason for hiding this comment

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

Nice little fix @rumzledz with a big impact 😄 Having just worked with the staking and claiming stuff I know that it can be a bit of a brainmelter too. Good stuff! 🚀

Works as expected, can claim back my hard fought stake even if I hate the payment:

Screen.Recording.2025-01-24.at.17.27.14.mov

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.

Return stakes is failing for a motion
2 participants