fix: alert user on biometric changed TO-454#25423
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
47df805 to
b25997a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key changes:
Why SmokeAccounts: This tag covers account security flows including credential management, SRP export, and wallet details. The authentication changes directly affect how accounts are secured and accessed. The Why SmokeWalletPlatform: This tag covers wallet lifecycle including SRP import flows, account deletion, and multi-SRP architecture - all of which go through authentication. The Why NOT all tags: The changes are well-contained to authentication internals. The new biometric error handling is Android-specific and only triggers in an edge case (biometric change). The refactoring is clean. No UI components were changed. The locale strings are new additions (no existing strings modified). The unit tests provide good coverage of the new behavior. Performance: No performance impact expected - these are error handling and storage flag cleanup operations, not rendering or data loading changes. Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|




Description
User change biometric ( add / remove fingerprint) Metamask wallet not able to detect and handle it properly
TO-454
Changelog
CHANGELOG entry: Alert User on biometric changed
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
Screen.Recording.2026-03-18.at.3.17.33.PM.mov
After
Screen.Recording.2026-03-18.at.3.34.13.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches unlock and credential-reset flows: mis-detection could incorrectly reset local auth settings or interrupt login, though changes are scoped and covered by new unit tests.
Overview
Adds handling for the Android "biometrics changed" failure case during
Authentication.unlockWallet: when the thrownError.messagecontainsUSER_NOT_AUTHENTICATED, the app shows a non-cancelable alert and then locks the app withreset: trueto clear stored credentials.Refactors auth cleanup by centralizing removal of legacy auth storage flags and remember-me state into
clearAuthStorageFlags, reusing it from bothstorePasswordandresetPassword, and ensuringresetPasswordalso disables OS auth in Redux.Updates constants and strings to include
UNLOCK_WALLET_ERROR_MESSAGES.USER_NOT_AUTHENTICATEDplus newlogin.biometric_changed*i18n keys, and extends tests to cover the new reset behavior and alert/lock paths.Written by Cursor Bugbot for commit 288036e. This will update automatically on new commits. Configure here.