Skip to content

fix: skip biometric cancellation error recording in mixpanel#25087

Merged
grvgoel81 merged 2 commits intomainfrom
feat-SL-460-skip-biometric-error-recording
Jan 23, 2026
Merged

fix: skip biometric cancellation error recording in mixpanel#25087
grvgoel81 merged 2 commits intomainfrom
feat-SL-460-skip-biometric-error-recording

Conversation

@grvgoel81
Copy link
Copy Markdown
Contributor

@grvgoel81 grvgoel81 commented Jan 23, 2026

Description

Changelog

CHANGELOG entry: null

Related issues

Fixes:

  1. https://consensyssoftware.atlassian.net/browse/SL-460
  2. https://consensyssoftware.atlassian.net/browse/SL-461

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Skips logging and analytics when biometric auth is cancelled to avoid noisy error reporting during unlock flows.

  • Login: Detects biometric cancellation (DENY_PIN_ERROR_ANDROID, UNLOCK_WALLET_ERROR_MESSAGES.IOS_USER_CANCELLED_BIOMETRICS), disables biometry, stops loading, and returns early without logging or tracking; minor refactor of error branches and vault corruption handling.
  • OAuth Rehydration: Adds the same cancellation handling and prevents REHYDRATION_PASSWORD_FAILED tracking; refines error tracking to use error_type: passcode_not_set when relevant.
  • Tests: New tests verify no Logger.error or Mixpanel tracking on biometric cancellations (Android/iOS); supporting mocks and timer cleanup added.

Written by Cursor Bugbot for commit 30a47a8. Configure here.

@grvgoel81 grvgoel81 self-assigned this Jan 23, 2026
@grvgoel81 grvgoel81 added the team-onboarding Onboarding team label Jan 23, 2026
@grvgoel81 grvgoel81 requested a review from a team as a code owner January 23, 2026 05:05
@github-actions
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

The changes in this PR are focused on improving error handling for biometric authentication cancellation in the Login and OAuthRehydration components. The modifications include:

  1. Login component (index.tsx): Added handling for iOS biometric cancellation (using UNLOCK_WALLET_ERROR_MESSAGES.IOS_USER_CANCELLED_BIOMETRICS), refactored error handling logic with better variable naming for vault corruption and seedless password scenarios. The core login flow remains unchanged.

  2. OAuthRehydration component (index.tsx): Similar improvements for biometric cancellation handling on both Android and iOS, plus improved analytics tracking for passcode not set errors.

  3. Unit tests: Added comprehensive unit tests for the biometric cancellation scenarios in both components.

Key observations:

  • The changes only affect error handling paths, not the happy path of login/authentication
  • Biometric authentication is not tested in E2E tests (confirmed by searching for biometric-related patterns in e2e/ directory)
  • The PR includes thorough unit tests for the new functionality
  • The loginToApp helper used in E2E tests goes through the password-based login flow, not biometric authentication
  • No changes to the core authentication logic or UI elements that E2E tests interact with

Since the changes are limited to error handling for biometric cancellation (which cannot be tested in E2E), and the main login flow remains unchanged, no E2E test tags are required.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@ieow ieow left a comment

Choose a reason for hiding this comment

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

lgtm

@grvgoel81 grvgoel81 enabled auto-merge January 23, 2026 06:43
@grvgoel81 grvgoel81 disabled auto-merge January 23, 2026 06:43
Copy link
Copy Markdown
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

@grvgoel81 grvgoel81 added this pull request to the merge queue Jan 23, 2026
Merged via the queue into main with commit c6a28b6 Jan 23, 2026
58 checks passed
@grvgoel81 grvgoel81 deleted the feat-SL-460-skip-biometric-error-recording branch January 23, 2026 10:05
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2026
@metamaskbot metamaskbot added the release-7.64.0 Issue or pull request that will be included in release 7.64.0 label Jan 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.64.0 Issue or pull request that will be included in release 7.64.0 size-M team-onboarding Onboarding team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants