Skip to content

[pull] main from MetaMask:main#411

Merged
pull[bot] merged 8 commits into
Reality2byte:mainfrom
MetaMask:main
Dec 15, 2025
Merged

[pull] main from MetaMask:main#411
pull[bot] merged 8 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Dec 15, 2025

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 : )

tommasini and others added 8 commits December 15, 2025 11:57
…ce (#23914)

<!--
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**

This PR refactors the seedless password outdated modal logic by moving
it from the Main component to the Authentication service. The
Authentication service is now the single source of truth for all
authentication-related operations, including checking and displaying the
seedless password outdated modal.

**Reason for change:**
1. The seedless password outdated check and modal display logic was
previously embedded in the Main component, which violates separation of
concerns
2. Authentication-related logic should be centralized in the
Authentication service for better maintainability and testability
3. This change improves code organization and makes the logic reusable
across the application

**Improvement/solution:**
1. Created a new method `checkAndShowSeedlessPasswordOutdatedModal` in
the Authentication service that encapsulates the entire flow
2. The method accepts `isSeedlessPasswordOutdated` as a parameter,
making it flexible and testable
3. Simplified the Main component by removing inline logic and replacing
it with a single method call
4. Added comprehensive test coverage for the new method with 4 test
cases covering all scenarios

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes:

## **Manual testing steps**

Feature: Seedless password outdated modal

  Scenario: user navigates to main screen with outdated password
    Given user has seedless onboarding enabled
    And user's seedless password is outdated
    And user successfully logs in

    When user navigates to the main wallet screen
    Then the seedless password outdated modal is displayed
    And when user taps the confirm button, the app locks

  Scenario: user navigates to main screen with up-to-date password
    Given user has seedless onboarding enabled
    And user's seedless password is up-to-date
    And user successfully logs in

    When user navigates to the main wallet screen
    Then no modal is displayed
    And user can use the app normally## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

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

- [ ] 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]
> Moves seedless password outdated check/modal from Main to
Authentication service with a new helper and adds focused tests.
> 
> - **Authentication service
(`app/core/Authentication/Authentication.ts`)**:
> - Add
`checkAndShowSeedlessPasswordOutdatedModal(isSeedlessPasswordOutdated)`
to verify outdated state via `checkIsSeedlessPasswordOutdated(false)`
and navigate to `Routes.SHEET.SUCCESS_ERROR_SHEET` with non-interactable
error modal and lock-on-confirm.
>   - Wire i18n strings and `IconName.Danger` for the modal.
> - **Main navigator (`app/components/Nav/Main/index.js`)**:
> - Replace inline modal logic with
`Authentication.checkAndShowSeedlessPasswordOutdatedModal(isSeedlessPasswordOutdated)`
in `useEffect`.
> - **Tests (`app/core/Authentication/Authentication.test.ts`)**:
> - Add suite for `checkAndShowSeedlessPasswordOutdatedModal` covering:
early return when flag false, early return when recheck false, modal
navigation when outdated, and lock on primary action.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
59ec053. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
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**

This PR fixes the balance formatting in the Perps feature to preserve
trailing zeros for a more consistent and professional currency display.

## **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: Fixed balance display in Perps to show proper decimal
formatting with trailing zeros

## **Related issues**

Jira Issue: https://consensyssoftware.atlassian.net/browse/TAT-2218

## **Manual testing steps**

```gherkin
Feature: Perps Balance Display Formatting

  Scenario: user views total and available balance with trailing zeros
    Given user has the Perps feature opened and has a balance

    When user views the Perps home screen
    Then the total balance should display with proper decimal formatting (e.g., "$5,000.00" not "$5,000")
    And the available balance should display with proper decimal formatting (e.g., "$1,250.10" not "$1,250.1")
```

## **Screenshots/Recordings**

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

### **Before**

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

![IMG_1428](https://github.com/user-attachments/assets/2e125123-eca0-4850-a31e-e00524d70597)


### **After**

<!-- [screenshots/recordings] -->
<img width="1206" height="2622" alt="Simulator Screenshot - iPhone 17
Pro - 2025-12-10 at 16 19 02"
src="https://github.com/user-attachments/assets/937ff440-15f5-4842-a709-ed1eee9c6215"
/>


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

- [ ] 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]
> Ensure Perps balances display trailing zeros by updating fiat
formatting options in balance components.
> 
> - **Perps UI**
>   - **Balance formatting**
> - `PerpsMarketBalanceActions.tsx`: Import `PRICE_RANGES_MINIMAL_VIEW`;
format `availableBalance` with `{ ranges: PRICE_RANGES_MINIMAL_VIEW,
stripTrailingZeros: false }`.
> - `PerpsTabControlBar.tsx`: Format `totalBalance` with `{ ranges:
PRICE_RANGES_MINIMAL_VIEW, stripTrailingZeros: false }`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
65032ec. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: dylanbutler1 <99672693+dylanbutler1@users.noreply.github.com>
## **Description**

Add 60-second position age requirement before showing margin warning
banners. Previously, the "Add margin" and "Set stop loss" banners could
appear immediately after opening a position, which was disruptive. Now
banners only appear after the position has been open for at least 60
seconds.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2161

## **Manual testing steps**

```gherkin
Feature: Margin warning banner timing

  Scenario: Banner does not appear immediately after opening position
    Given user opens a 40X BTC long position

    When position is opened
    Then no warning banner should appear immediately

  Scenario: Banner appears after 60 seconds if conditions are met
    Given user has a position open for more than 60 seconds
    And position is within 3% of liquidation (or ROE <= -20%)

    When 60 seconds have passed since opening
    Then the appropriate warning banner should appear
```

## **Screenshots/Recordings**

N/A - timing behavior change

## **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]
> Gates stop‑loss/margin banners behind 60s position age and ≥10% loss,
adds fade‑out visibility orchestration (isVisible/isDismissing), updates
view integration, expands tests, and tweaks banner button style.
> 
> - **Perps stop‑loss prompt logic (`useStopLossPrompt`)**:
>   - Add minimum position age gating (`POSITION_MIN_AGE_MS = 60s`).
>   - Add minimum loss gating (`MIN_LOSS_THRESHOLD = -10%`).
> - Implement visibility orchestration with fade‑out: new `isVisible`,
`isDismissing`, `onDismissComplete`; preserve variant during dismissal.
> - Server timestamp bypass now also passes age check; maintains
debounce behavior.
> - **Config (`constants/perpsConfig.ts`)**:
> - Extend `STOP_LOSS_PROMPT_CONFIG` with `MIN_LOSS_THRESHOLD` and
`POSITION_MIN_AGE_MS`.
> - **View integration (`PerpsMarketDetailsView.tsx`)**:
> - Switch banner rendering to `isVisible` and success state to include
`isDismissing`.
>   - Wire `onFadeOutComplete` to hook’s `onDismissComplete`.
> - **Tests (`useStopLossPrompt.test.ts`)**:
> - Add cases for age gating, min‑loss gating, debounce bypass,
visibility orchestration, and variant preservation.
> - **Styles (`PerpsStopLossPromptBanner.styles.ts`)**:
>   - Center banner button (`alignSelf: 'center'`).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
04e67db. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
)

<!--
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**

This Pr fixed an scenario where gasless checks are completed, user has
gas fee tokens to pay for the transaction, is automatically selected the
other tokens available but user uses the modal to select the native
token, which should be flagged by the alert and block user to submit the
transaction.

<!--
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?
-->

## **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: Fixed an issue where switching back to the native token
after automatic gas fee token selection did not trigger the insufficient
balance alert.

## **Related issues**

Fixes: MetaMask/mobile-planning#2383

## **Manual testing steps**

```gherkin
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**


[fixed_alert.webm](https://github.com/user-attachments/assets/77eca79c-e00c-4b06-becc-2011f932dfc2)


[alert_without_gasfeetokens.webm](https://github.com/user-attachments/assets/45d70640-a103-4be5-a0f4-eef93d427dba)


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

### **Before**

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

### **After**

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

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

- [ ] 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]
> Updates alert logic to trigger when gas fee tokens are available but
not selected and refines automatic gas fee token selection; adds a
targeted test.
> 
> - **Alerts**
> - `useInsufficientBalanceAlert`: Refines
`shouldCheckGaslessConditions` to also trigger when gas fee tokens exist
but no token is selected; keeps alert gated by simulation completion and
unsponsored status; minor condition reordering for clarity.
> - **Auto-selection**
> - `useAutomaticGasFeeTokenSelect`: Removes dependency on `isSupported`
for auto-selection; now auto-selects the first non-native gas fee token
when balance is insufficient and no token is selected (still considers
`isSmartTransaction`).
> - **Tests**
> - `useInsufficientBalanceAlert.test`: Adds test covering the case
where gas fee tokens are available but none is selected, asserting the
insufficient balance alert is shown.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0c49375. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
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?
-->

Fixes: ##23966

shim-pref is polyfill hmac with native library in pr
#23746 but `.create` is
not polyfilled.
This is causing social login failed as seedless library are calling
`hkdf` from nobleCurve which called `hmac.create`

in the original hmac file in noble curve
```
/**
 * HMAC: RFC2104 message authentication code.
 * @param hash - function that would be used e.g. sha256
 * @param key - message key
 * @param message - message data
 * @example
 * import { hmac } from '@noble/hashes/hmac';
 * import { sha256 } from '@noble/hashes/sha2';
 * const mac1 = hmac(sha256, 'key', 'message');
 */
export const hmac: {
  (hash: CHash, key: Input, message: Input): Uint8Array;
  create(hash: CHash, key: Input): HMAC<any>;
} = (hash: CHash, key: Input, message: Input): Uint8Array =>
  new HMAC<any>(hash, key).update(message).digest();
hmac.create = (hash: CHash, key: Input) => new HMAC<any>(hash, key);
```

This pr is to polypill the `.create` function


## **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: null

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
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**

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

### **Before**

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

### **After**

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

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

- [ ] 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]
> Polyfills `hmac.create` by copying original HMAC methods onto the
patched function and then assigning it to `@noble/hashes/hmac`.
> 
> - **Shim (`shimPerf.js`)**:
> - **HMAC patch**: Wraps `hmac` to use native `hmacSha512` when
applicable and uses `Object.assign(patchedHmac, originalHmac)` before
reassigning, preserving `.create` and other methods.
> - Maintains existing keccak and secp256k1 monkey patches (no
functional changes).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
b2c0a54. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
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?
-->

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

## **Manual testing steps**

```gherkin
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**

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

### **Before**

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

### **After**

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

## **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]
> Disable the "claim winnings via market details" e2e test by marking it
as skipped to unblock CI.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7c2a78d. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
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**

remove ens calls from account list to improve perf

<!--
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?
-->

## **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: remove ens calls from account list to improve perf

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
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**

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

### **Before**

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


https://github.com/user-attachments/assets/0e03ec65-2c9e-4c24-8c72-825d5c809ca7






### **After**

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



https://github.com/user-attachments/assets/353267ee-e869-41c8-a01c-1ffbe5b75883



## **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]
> Introduce a `fetchENS` flag to `useAccounts` (default true) and pass
`fetchENS: false` from `AccountSelector` to avoid ENS lookups when the
accounts list opens; add tests for both behaviors.
> 
> - **Hooks (`useAccounts`)**:
> - Add optional `fetchENS` param (default `true`) to
`UseAccountsParams` and hook signature.
>   - Conditionally call `fetchENSNames` based on `fetchENS`.
> - Export `evmAccounts` alongside `accounts` and `ensByAccountAddress`
(unchanged behavior).
> - **UI (`AccountSelector`)**:
> - Pass `{ isLoading: reloadAccounts, `fetchENS: false` }` to
`useAccounts` to skip ENS lookups when opening the account list.
> - **Tests (`useAccounts.test.ts`)**:
> - Add cases verifying ENS fetching when `fetchENS` is true (default
and explicit) and not fetching when `false`.
>   - Minor test description tweak (grammar).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
3befab0. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
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**

upgrade assets controllers to v94.1.0

<!--
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?
-->

## **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: bump assets controllers to v94.1.0

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
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**

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

### **Before**

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

### **After**

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

## **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]
> Upgrade assets-controllers to v94.1.0 and align token
balance/detection controller initialization and messengers (add
isOnboarded, remove platform/useAccountsAPI, update delegated
actions/events).
> 
> - **Dependencies**
>   - Bump `@metamask/assets-controllers` to `^94.1.0`.
> - **Engine Controllers**
>   - `token-balances-controller-init`
>     - Add `isOnboarded` option using `selectCompletedOnboarding`.
>     - Update tests to expect `isOnboarded`.
>   - `token-detection-controller-init`
>     - Remove `platform` and `useAccountsAPI` options.
>     - Update tests to match new constructor args.
> - **Messengers**
>   - `token-balances-controller-messenger`
> - Actions: add `TokenDetectionController:addDetectedTokensViaPolling`,
`...:addDetectedTokensViaWs`, `...:detectTokens`,
`KeyringController:getState`.
> - Events: add `KeyringController:lock`, `KeyringController:unlock`,
`TransactionController:transactionConfirmed`,
`TransactionController:incomingTransactionsReceived`.
>   - `token-detection-controller-messenger`
> - Actions: add `AccountsController:getAccount`; remove
`AuthenticationController:getBearerToken`.
>     - Events: no net new events; ordering adjusted.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8462734. 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 Dec 15, 2025
@pull pull Bot added the ⤵️ pull label Dec 15, 2025
@pull pull Bot merged commit 4f01e3c into Reality2byte:main Dec 15, 2025
0 of 10 checks passed
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.

7 participants