Skip to content

[QA 1.11] Adjust hash key refresh and infinite loading#732

Closed
leofelix077 wants to merge 7 commits intomainfrom
lf-fix-infinite-loop
Closed

[QA 1.11] Adjust hash key refresh and infinite loading#732
leofelix077 wants to merge 7 commits intomainfrom
lf-fix-infinite-loop

Conversation

@leofelix077
Copy link
Collaborator

@leofelix077 leofelix077 commented Feb 23, 2026

Checklist

PR structure

  • This PR does not mix refactoring changes with feature changes (break it down into smaller PRs if not).
  • This PR has reasonably narrow scope (break it down into smaller PRs if not).
  • This PR includes relevant before and after screenshots/videos highlighting these changes.
  • I took the time to review my own PR.

Testing

  • These changes have been tested and confirmed to work as intended on Android.
  • These changes have been tested and confirmed to work as intended on iOS.
  • I have tried to break these changes while extensively testing them.
  • This PR adds tests for the new functionality or fixes.

Release

  • This is not a breaking change.
  • This PR updates existing JSDocs when applicable.
  • This PR adds JSDocs to new functionalities.
  • I've checked with the product team if we should add metrics to these changes.
  • I've shared relevant before and after screenshots/videos highlighting these changes with the design team and they've approved the changes.

@leofelix077 leofelix077 self-assigned this Feb 23, 2026
Copilot AI review requested due to automatic review settings February 23, 2026 17:34
@leofelix077 leofelix077 added bug Something isn't working wip work in progress don't review yet Work in Progress / Draft PR / Code Review adjustments being worked on labels Feb 23, 2026
@leofelix077 leofelix077 requested a review from CassioMG February 23, 2026 17:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses authentication flow issues related to hash key refresh and infinite loading states. The changes focus on improving the initialization sequence in RootNavigator to prevent race conditions, adjusting the logout flow to avoid showing authenticated screens during data wipe, and adding better error handling for biometric authentication failures.

Changes:

  • Refactored RootNavigator initialization to wait for auth status to be fetched before rendering UI, preventing flashing of wrong screens
  • Modified logout flow to immediately set NOT_AUTHENTICATED state before async cleanup operations
  • Added error toast notifications for biometric authentication and unlock failures
  • Changed shouldRefreshHashKey parameter from false to true in signIn flow (potential issue identified)

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/navigators/RootNavigator.tsx Adds isAuthStatusReady state to prevent rendering until auth status is loaded from storage; uses refs to capture biometric values
src/hooks/useAppOpenBiometricsLogin.ts Adds AUTH_STATUS.LOCKED to biometric login trigger condition and error toast handling
src/components/screens/LockScreen.tsx Adds error toast for non-password-related unlock errors
src/ducks/auth.ts Changes shouldRefreshHashKey to true (creates redundancy issue); improves logout flow by setting state before async cleanup
src/i18n/locales/en/translations.json Adds error messages for wallet unlock failures
src/i18n/locales/pt/translations.json Adds Portuguese translations for error messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working don't review yet Work in Progress / Draft PR / Code Review adjustments being worked on wip work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants