Skip to content

[pull] main from MetaMask:main#546

Merged
pull[bot] merged 3 commits into
Reality2byte:mainfrom
MetaMask:main
Feb 24, 2026
Merged

[pull] main from MetaMask:main#546
pull[bot] merged 3 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Feb 24, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Cal-L and others added 3 commits February 24, 2026 00:08
…N_APP_TRIGGERED_AUTH error (#25553)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

These changes tracks errors as analytics for unlockWallet method in
Authentication service and removes the false positive error event
`AUTHENTICATION_APP_TRIGGERED_AUTH_NO_CREDENTIALS` and modernizes
triaging error handling events associated with unlocking the wallet.

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry:

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MCWP-309

## **Manual testing steps**

- Run this branch
- Trigger unlock when logging in
- Cancel biometric
- Notice tracked error event as analytics in metro logs

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

Tested on iOS device
Unlock wallet error event is tracked as analytics
<img width="646" height="95" alt="image"
src="https://github.com/user-attachments/assets/215d6ea7-9bd5-4b5f-bed1-6f7753f2b05f"
/>

When failing to authentication via password entry
<img width="655" height="59" alt="image"
src="https://github.com/user-attachments/assets/17978ca9-6eb2-4979-a44a-c768342633b4"
/>


## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] 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.



<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches wallet unlock and authentication error-classification paths;
mistakes could change which errors trigger password prompts or
analytics, but the logic changes are small and covered by updated tests.
> 
> **Overview**
> Adds analytics instrumentation to `Authentication.unlockWallet` so
failures now call `trackErrorAsAnalytics('Unlock Wallet Error',
error.message)` even when `lockApp` runs/throws.
> 
> Removes the legacy `AUTHENTICATION_APP_TRIGGERED_AUTH_NO_CREDENTIALS`
constant and the prior conversion of `PASSWORD_NOT_SET_WITH_BIOMETRICS`
into an `AuthenticationError`; UI handling in `DeviceSecurityToggle`
(and tests) is updated to detect the password-required case via
`containsErrorMessage(...,
ReauthenticateErrorType.PASSWORD_NOT_SET_WITH_BIOMETRICS)`. Vault
corruption tracking is tightened to stop treating this auth failure as a
vault-corruption signal.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
12c6ec3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…#25656)

## **Description**

The `getNextAvailableAccountName` method and action were removed from
the `AccountsController`. The method was used during account creation
and is no longer being used. All of its call sites are inside of dead
code at this point. Minimal changes were made in the mobile client to
allow for the `AccountsController` update to be shipped.

Note: This change brings a performance improvement to the account
creation process.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes: N/A

## **Manual testing steps**

1. Build and run the app in the simulator.
2. Confirm that it runs.

## **Screenshots/Recordings**

N/A

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches account creation/name suggestion paths and upgrades several
core controller dependencies; behavior changes are mostly test-covered
but could affect default naming/UX if any call sites were still relied
upon.
> 
> **Overview**
> Removes remaining app-side dependencies on
`AccountsController.getNextAvailableAccountName` by no longer
pre-populating default names in the Snap custom-name approval and
multichain account name helper (now starting from an empty string when
no suggestion is provided).
> 
> Updates unit/smoke tests and fixtures to reflect the new naming
behavior (e.g., empty initial names and updated multichain
`accountNameSuggestion` expectations), and refreshes fixture data so
imported HD accounts are named correctly.
> 
> Bumps multiple MetaMask controller/keyring-related packages (including
`accounts-controller`, `account-api`, `eth-snap-keyring`, and multichain
controllers) and updates `yarn.lock`/resolutions accordingly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1612c1e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
#26407)

## **Description**

The HyperLiquid SDK's `transport.ready()` can reject with `undefined`
when `controller.abort()` is called without a reason (leaving
`AbortSignal.reason` as `undefined`). This `undefined` propagates
through the catch chain in `ensureTransportReady()` and eventually
reaches `ensureError()` in callers, producing **"Unknown error (no
details provided)"** in Sentry — currently affecting 4 active issues
across versions 7.63.1–7.65.0.

**Root cause**: `setTimeout(() => controller.abort(), timeoutMs)` — no
reason passed, so `AbortSignal.reason` is `undefined`. The HyperLiquid
SDK resolves `transport.ready()` rejection with `AbortSignal.reason`,
yielding `undefined`. The existing catch block then re-throws the raw
`undefined`.

**Fix** — two adjacent lines in `ensureTransportReady()`:
1. Pass a proper `Error` as the reason to `controller.abort()` so
`AbortSignal.reason` is never `undefined` when the timeout fires.
2. Replace the bare `throw error` in the non-timeout catch path with
`throw ensureError(error, ...)` as a defensive safety net.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes: Sentry issues METAMASK-MOBILE-5E7M, METAMASK-MOBILE-5EF8,
METAMASK-MOBILE-5GBE, METAMASK-MOBILE-5G91 ("Unknown error (no details
provided)" in perps chart on versions 7.63.1–7.65.0)

## **Manual testing steps**

```gherkin
Feature: Perps chart error handling

  Scenario: user opens and immediately closes the perps chart
    Given the user is on the main wallet screen
    And network connectivity is normal

    When user navigates to the Perps tab
    And user immediately navigates away before the chart finishes loading

    Then no "Unknown error (no details provided)" error appears in Sentry
    And the app does not crash
```

## **Screenshots/Recordings**

### **Before**

Sentry issues METAMASK-MOBILE-5E7M / 5EF8 / 5GBE / 5G91 receive new
events on versions 7.63.1–7.65.0.

### **After**

No new events on those Sentry issues after this fix ships.

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Small, localized change to WebSocket readiness error handling plus a
unit test; low risk aside from slightly different error wrapping that
could affect upstream error matching/logging.
> 
> **Overview**
> Prevents `ensureTransportReady()` from ever rethrowing `undefined`
when the HyperLiquid SDK rejects without an error.
> 
> The timeout now aborts with an `Error` reason (so `AbortSignal.reason`
is meaningful), and non-timeout failures are normalized via
`ensureError(..., 'HyperLiquidClientService.ensureTransportReady')`.
Adds a unit test covering the `Promise.reject(undefined)` SDK edge case
to ensure callers always receive a real `Error` instance.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0cf97b6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@pull pull Bot locked and limited conversation to collaborators Feb 24, 2026
@pull pull Bot added the ⤵️ pull label Feb 24, 2026
@pull pull Bot merged commit d9d4b64 into Reality2byte:main Feb 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants