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 Unlock Profile(Verify) #1926

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Fix Unlock Profile(Verify) #1926

merged 1 commit into from
Oct 16, 2024

Conversation

corlard3y
Copy link
Collaborator

@corlard3y corlard3y commented Oct 16, 2024

Pull Request Template

#1927

Description

  • Problem/Feature:

Type of Change

  • Bug fix
  • New feature
  • Code refactor
  • Documentation update
  • Other (please describe):

Checklist

  • Quick PR: Is this a quick PR? Can be approved before finishing a coffee.
    • Quick PR label added
  • Not Merge Ready: Is this PR dependent on some other PR/tasks and not ready to be merged right now.
    • DO NOT Merge PR label added

Frontend Guidelines

Build & Testing

  • No errors in the build terminal
  • Engineer has tested the changes on their local environment
  • Engineer has tested the changes on deploy preview

Screenshots/Video with Explanation

  • Before: Explain the previous behavior

  • After: What's changed now

Additional Context

Review & Approvals

  • Self-review completed
  • Code review by at least one other engineer
  • Documentation updates if applicable

Notes

Copy link

File 1 (useLockedStatus.js):

  1. In the useEffect hook, there is a possible issue with the condition if (status === 'error' && isWalletConnected). It might be more appropriate to check if error is truthy instead of just status === 'error'.
  2. It would be good to add some error handling for the cases where userDetails?.userId is invalid or not present.
  3. In the getLockStatus function, the logic to set isLocked based on certain conditions seems correct.

File 2 (useRewardsAuth.js):

  1. The isAuthModalVisible and setIsAuthModalVisible property of the useRewardsContext hook is being used correctly.
  2. In the unlockProfile function, it's good to add more error handling and improve the comments for better understanding of the logic.
  3. You may need to check the condition in the useEffect hook for status === 'error' && activeTab == 'dashboard' && !isVerifyClicked. It seems to handle flow when there is an error, but further clarification might be needed.

Overall, the code seems to be structured well and contains the necessary logic for managing rewards and authentication flow. Let me know if you need any more specific feedback on certain parts of the code.

All looks good.

Copy link

github-actions bot commented Oct 16, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-10-16 11:25 UTC

@rohitmalhotra1420 rohitmalhotra1420 merged commit 22357a5 into main Oct 16, 2024
2 of 3 checks passed
@rohitmalhotra1420 rohitmalhotra1420 linked an issue Oct 17, 2024 that may be closed by this pull request
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.

Fix Unlock Profile
2 participants