Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Fix getUserTotalValue function #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MSalaberry
Copy link

Hi Patrick! If you do the require and the user has no tokens the transaction will revert, stopping the execution of issueTokens function.
Additionally, the "if (uniqueTokensStaked[_user] <= 0)" in getUserSingleTokenValue function is now redundant in this implementation, but how it is a public function i didn't delete it.

If you do the require and the user has no tokens the transaction will revert, stopping the execution of issueTokens function.
Additionally, the "if (uniqueTokensStaked[_user] <= 0)" in getUserSingleTokenValue function is now redundant in this implementation, but how it is a public function i didn't delete it.
@PatrickAlphaC
Copy link
Owner

Ah... Thank you so much for this!

Could you make it as a comment actually? Users who watched the video will be confused by the different code. Thank you so much for this PR though! You're right!

@MSalaberry
Copy link
Author

No problem! I submit another PR with the comments of this function.

@Markkop
Copy link

Markkop commented Jan 14, 2022

Nice catch!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants