PatrickAlphaC / defi-stake-yield-brownie-freecode

52 stars 62 forks source link

Fixed error in unstakeTokens function #17

Closed MeLlamoValen closed 2 years ago

MeLlamoValen commented 2 years ago

Fixed error that didn't remove users from stakers array. If they stake a token, unstake it, and stake it again, they would appear twice in the stakers array, and therefore receive two times the reward when issueTokens is called.

PatrickAlphaC commented 2 years ago

Thank you!

So that it doesn't confuse people watching the video, could you add this as a comment? Saying something like:

The following code fixes x problem not addressed in the video
MeLlamoValen commented 2 years ago

You are welcome! I will close this pull request and make another one