Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: reward aggregator #875
feat: reward aggregator #875
Changes from all commits
13bf6ff
be3bade
2069a6f
4b6604b
e3d6197
408d685
fdbd153
c73abf4
4c3863f
efecc72
fab8db6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Ensure loading state is properly managed in error scenarios
In the
useEffect
hook, if an error occurs while fetching rewards, thesetLoading(false)
function is not called. This may cause the loading spinner to remain indefinitely.Apply this diff to set the loading state in the
catch
block:.catch((error) => { showNotification("Error while fetching rewards", "error"); console.log("Error while fetching rewards", error); + setLoading(false); });
📝 Committable suggestion
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.
Avoid logging sensitive data in the console
Including
calls
in the console log may expose sensitive information. It's recommended to log only the error.Apply this diff to remove
calls
from the log statement:📝 Committable suggestion
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.
Update dependency array to include all external dependencies
The dependency array for
doClaimRewards
is missing some external variables used within the function. This may lead to stale closures if those variables change.Apply this diff to include all necessary dependencies:
📝 Committable suggestion