chore: Abstract unlock method into Authentication service#23958
chore: Abstract unlock method into Authentication service#23958
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. |
…/6008-abstract-auth-api-cal
…rors are encountered
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThe changes are in the critical Key changes include:
While the saga code is commented out and the
The changes also include modifications to the Given the high-risk nature of authentication changes and their potential impact on core wallet functionality, comprehensive testing is warranted. |
|



Description
This PR introduces a consolidated
unlockWalletmethod in theAuthenticationservice. In follow up PRs, we will be replacing bothuserEntryAuthandappTriggeredAuthinvocations with this new method. Under the hood,unlockWallethandles both manual and biometric password login as well as seedless onboarding checks. Unit tests has been provided to validate functionality.Changelog
CHANGELOG entry:
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MCWP-238
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds a unified wallet unlock path and supporting utilities to streamline login flows and error handling.
Authentication.unlockWalletto handle manual/biometric login, seedless rehydration/password sync checks, post-login ops, and navigation toonboardingorhomeutils(handlePasswordSubmissionError,checkPasswordRequirement),constants(error strings,MIN_PASSWORD_LENGTH), andtypes(UnlockWalletErrorType) for granular error handlingunlockWalletviauseAuthenticationhooklockApp(explicit keyring lock, state reset, navigation)unlockWalletand new utils; adjusts existing tests (e.g., vault recreation failure expectations)store/sagas/authentication.tsfor future state machine integrationWritten by Cursor Bugbot for commit c65e0e2. This will update automatically on new commits. Configure here.