Conversation
user is on welcome screen - no auth needed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
user is on welcome screen - no auth needed
May fix the android flicker for new users
AI analysis:
Good news — all three videos confirm the same root cause, just manifesting differently across devices. Here's the updated analysis:
Video 2 (11.41.23): The system biometric dialog stays stable on screen, but the app's own UI behind it flickers. The
AuthWrapperlock screen appears and disappears behind the dimmed overlay. This is theisAuthenticatedstate bouncing —checkAuthentication()keeps settingisAuthenticated: true(its else branch) while the pendingauthenticate()call then sets it back tofalsewhen it resolves with a failure.Video 3 (11.41.27): Shows the Welcome screen ("Create Wallet" / "Import Wallet") with a "Welcome back" bottom sheet (fingerprint + "Use PIN") looping at ~1Hz. That bottom sheet is the OEM-styled Android biometric prompt (Samsung/Xiaomi/etc. customize its appearance as a bottom sheet). Same loop: prompt appears →
inactive→recordBackgroundTime()starts async →resumedfires before it completes →checkAuthentication()reads stalelastPausedTime→ triggersauthenticate()again → new prompt → repeat.All three fit the same theory. The fix I already applied should handle all cases:
Why this single fix covers all three scenarios:
When
isAuthenticatingis true (biometric dialog is showing), theelsebranch is completely skipped. This means:_isBackgroundedstaysfalserecordBackgroundTime()is never called (no stalelastPausedTimerace)resumed, theif (_isBackgrounded)guard on line 88 blockscheckAuthentication()from runningThe biometric flow then proceeds normally:
authenticate()awaits the system prompt, user scans their finger (or cancels), and the result is handled without interference. No more lifecycle-triggered re-entry into the auth flow.