Skip to content

[pull] main from MetaMask:main#398

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

[pull] main from MetaMask:main#398
pull[bot] merged 12 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Dec 10, 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 : )

matallui and others added 12 commits December 10, 2025 13:20
<!--
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?
-->
Currently, fee collection settings are all hardcoded (amounts, collector
address, waived categories).
However, this creates a security concern in a scenario where the
collector account gets compromised.

This change enables the use of LD feature flag to configure the Predict
fee collection.

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

## **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]
> Adds remote-configurable Predict fee collection (percentages,
collector, waivers) and wires it through order preview and Polymarket
flows, replacing hardcoded fees.
> 
> - **Predict Fees (Feature Flag)**
>   - Add `PredictFeeCollection` type and `DEFAULT_FEE_COLLECTION_FLAG`.
> - Load `remoteFeatureFlags.predictFeeCollection` in
`PredictController.previewOrder` and pass `feeCollection` to providers.
> - **Polymarket Provider & Utils**
> - Update `previewOrder` and fee logic to accept `feeCollection`;
compute fees from `metamaskFee`/`providerFee`, respect `waiveList`, and
include `collector`.
> - Use `fees.collector` for Safe fee authorization in `placeOrder`;
remove hardcoded `FEE_PERCENTAGE` and `FEE_COLLECTOR_ADDRESS`.
> - **Types**
> - Extend `PredictFees` with `collector`; update provider interfaces to
accept `feeCollection`.
> - **Tests**
> - Adjust/add tests to validate flag-driven fee calculation, collector
propagation, waived-fee cases, and controller/provider integrations.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ec2cc32. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

The previous PR to improve ESLint config readability missed a few cases
where a number was used instead of a string for the rule severity. The
last ones have been updated now.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

This is a continuation of #23821

## **Manual testing steps**

N/A

## **Screenshots/Recordings**

N/A

## **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]
> Replaces remaining numeric ESLint severities with string "error" in
.eslintrc.js.
> 
> - **ESLint config (`.eslintrc.js`)**:
>   - Standardizes severity to strings (`'error'`) for:
>     - `no-constant-condition`
>     - `no-unneeded-ternary`
>     - `no-use-before-define` (now `['error', 'nofunc']`)
>     - `react/no-multi-comp`
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
3c4c8da. 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**

fix token balances init
<!--
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: fix token balances init

## **Related issues**

Fixes: #23637

## **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]
> Initialize TokenBalancesController with an empty `tokenBalances` state
when persisted state is missing or null, and add tests covering
persisted/default cases.
> 
> - **Controllers**:
> - Use `persistedState?.TokenBalancesController ?? { tokenBalances: {}
}` in `app/core/Engine/controllers/token-balances-controller-init.ts` to
safely default state when absent.
> - **Tests**:
>   - Add `beforeEach` to clear mocks.
> - Add tests asserting: persisted state is passed through; default
empty state is used when `TokenBalancesController` state is `undefined`
or when `persistedState` is `null`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0770ddb. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

This directory never exists on CI when the linter is run, but it often
exists locally and creates a ton of spurious lint errors and warnings.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

N/A

## **Manual testing steps**

N/A

## **Screenshots/Recordings**

N/A

## **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]
> Add `build` to `.eslintignore` to exclude build artifacts from
linting.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
95f5c5c. 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**
Bumps the Tron snap and patches bridge controller to allow for proper
fee computation

<!--
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 a bug where Tron TRC20 swap fees were
underestimated

## **Related issues**

Fixes: #23850

## **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]
> Patch bridge-controller to include `feeLimit` in non-EVM fee
computations and bump Tron snap to ^1.16.0.
> 
> - **Bridge fee computation**:
> - `dist/utils/quote-fees.{cjs,mjs}`: Include `feeLimit`
(`trade.raw_data?.fee_limit`) when building options for
`computeFeeRequest` in `appendNonEvmFees`.
> - **Dependencies**:
>   - Use Yarn patch for `@metamask/bridge-controller@61.0.0`.
>   - Bump `@metamask/tron-wallet-snap` to `^1.16.0`.
>   - Update `package.json`/`yarn.lock` to reflect these changes.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5cc61fc. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…nd non-EVM assets cp-7.61.0 (#23597)

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

**What is the reason for the change?**

The Asset view was incorrectly determining the selectedAddress when
viewing non-EVM assets (like Solana). The previous implementation used
selectedInternalAccount.address which always returns the globally
selected account's address. This meant when viewing a Solana asset, the
view was incorrectly using the EVM address instead of the Solana
address, causing issues with transaction filtering and display.

**What is the improvement/solution?**

Updated the Asset view to use selectSelectedInternalAccountByScope
selector which returns the correct account based on the asset's chain
scope:
Converts the asset's chainId to CAIP format using formatChainIdToCaip
Looks up the appropriate account for that chain scope (e.g., EVM account
for eip155:1, Solana account for
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp)
Falls back to the standard selected account address if no scope-specific
account is found
This follows the same pattern used in the bridge selectors
(selectSourceWalletAddress), ensuring consistency across the codebase.

**Key changes:**

- Added selectedAddressForAsset prop computed in mapStateToProps using
chain-scoped account selection
- Updated component to use selectedAddressForAsset instead of deriving
address from selectedInternalAccount
- Updated componentDidUpdate to properly react to address changes
- Added tests covering EVM assets, Solana assets, chainId format
conversion, and fallback behavior

## **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 a bug that was causing wrong url redirect on
solana asset "View full history" button

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-244

## **Manual testing steps**

```gherkin
Feature: Asset view uses correct chain-specific address

  Scenario: user views a Solana asset and sees transactions for their Solana address

    Given user has an account group with both EVM and Solana accounts
    And user has SOL transactions on Solana mainnet

    When user navigates to the SOL asset detail view

    Then the transaction list displays transactions associated with the Solana address
    And the asset overview shows the correct SOL balance
```

## **Screenshots/Recordings**

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

### **Before**


https://github.com/user-attachments/assets/1228271c-5cdb-4938-b7a0-35927c7f9099


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

### **After**


https://github.com/user-attachments/assets/91bf8e05-8504-4751-b5db-34b7293e6bbe


<!-- [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]
> Asset view now resolves the correct chain-scoped address (EVM and
non-EVM) and applies improved filtering/sorting for non-EVM
transactions.
> 
> - **Asset view (`app/components/Views/Asset/index.js`)**
> - Use `selectedAddressForAsset` derived via CAIP `chainId` and
`selectSelectedInternalAccountByScope`; fallback to
`selectSelectedInternalAccountAddress`.
> - Update `componentDidUpdate` to react to `selectedAddressForAsset`
changes; initialize `selectedAddress` from this prop.
> - Use route `chainId` throughout (e.g., ramp checks) instead of global
selector.
> - For non-EVM assets: render `MultichainTransactionsView` and apply
filtering logic:
> - Native assets: include only transactions where all participants
carry the chain’s native asset.
> - Tokens: filter by token address or unit; exclude empty-asset
transactions.
> - Sort by `time` desc; add simple cache (`cacheKey`,
`cachedFilteredTransactions`).
> - **Tests (`app/components/Views/Asset/index.test.js`)**
> - Add tests for chain-scoped address resolution (EVM and Solana), CAIP
conversion, and fallback behavior.
> - Add/adjust tests for non-EVM filtering (native vs SPL, mixed tx
exclusion, empty state) and sorting; update snapshots accordingly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8566187. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

This PR bumps the ENS resolver snap to `v1.1.0`.

## **Changelog**

CHANGELOG entry: Update ENS snap

## **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]
> Update `@metamask/ens-resolver-snap` from `^1.0.0` to `^1.1.0` in
`package.json` and `yarn.lock`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
83e4f99. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…3800)

<!--
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]
> Skips rendering Rive/Fox animations in E2E mode across onboarding,
login, and password screens; updates animation logic/tests and disables
Detox sync in a wallet details spec.
> 
> - **UI/Animations (E2E gating)**:
> - `UI/OnboardingAnimation/OnboardingAnimation.tsx`: Do not render
`Rive` when `isE2E`; initialize `isPlaying` to `isE2E`; fast-forward
animation state and call `setStartFoxAnimation(true)` in E2E; keep
logo/buttons visible via animated values.
> - `Views/Login`: Wrap `FoxAnimation` with `!isE2E` to prevent
rendering during E2E.
>   - `Views/Onboarding`: Wrap `FoxAnimation` with `!isE2E`.
> - `Views/ChoosePassword`: Wrap `FoxRiveLoaderAnimation` with `!isE2E`.
> - `Views/OnboardingSuccess/OnboardingSuccessEndAnimation`: Wrap `Rive`
with `!isE2E` and no-op side effects in E2E.
> - **Tests**:
> - `UI/OnboardingAnimation/OnboardingAnimation.test.tsx`: Update
E2E-mode test to assert the `Rive` component is not rendered (mock
methods undefined); align descriptions.
> - **E2E spec**:
> - `e2e/specs/accounts/wallet-details.spec.ts`: Add
`device.disableSynchronization()` before login.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2359cdf. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

This package had a peer dependency on ESLint v7, but we're using v8.
This update eliminates that peer dependency warning, and moves us closer
to updating to ESLint v9.


## **Changelog**

CHANGELOG entry: null

## **Related issues**

N/A

## **Manual testing steps**

N/A

## **Screenshots/Recordings**

N/A

## **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]
> Upgrades the ESLint TypeScript config to v10 and adds a temporary
`consistent-type-definitions` override enforcing `interface` in
`.eslintrc.js`.
> 
> - **Tooling / ESLint**:
> - Upgrade `@metamask/eslint-config-typescript` to `^10.0.0` in
`package.json` (lockfile updated accordingly).
>   - Update `.eslintrc.js` overrides for `*.{ts,tsx}`:
> - Add temporary `@typescript-eslint/consistent-type-definitions:
['error', 'interface']` rule to defer a breaking change.
> - Remove previous custom settings for
`@typescript-eslint/no-unused-vars`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
75899b3. 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**
Changing network through the network selector does not trigger NFT
detection, we have to refresh the tab by switching tabs which is not
great user experience.

Other bugs solved:
- Now we show the NFT auto detection disabled when its needed,
previously we were hiding it even when the setting was off
- We dont make any API calls for NFT detection when auto-detection is
off

NOTE: as part of this PR I have also centralized some logic and moved
other logic around

<!--
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: fix nft auto detection not triggered on network switch

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-2072

## **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/b639c099-9da8-4747-ae2a-749ed863eb33


### **After**


https://github.com/user-attachments/assets/d9f9ac5f-cc42-4abe-abb2-b8a103e43b8a


<!-- [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]
> Centralizes NFT detection in a reusable hook and triggers detection on
network changes and collectibles views, updating components and tests
accordingly.
> 
> - **Core**
> - Added `useNftDetection` hook encapsulating detection, loading
indicators, tracing, and analytics; respects user preference to avoid
API calls when disabled.
> - **UI**
> - `NftGrid`: triggers `detectNfts` on enabled network changes and when
full view gains focus; renders `NftGridHeader` outside the list;
integrates new hook.
> - `CollectibleDetectionModal`: enables preferences and calls
`detectNfts` via hook on CTA.
> - `NftGridRefreshControl`: uses hook for detection and updates
ownership across networks.
> - `Wallet`: calls `detectNfts` when switching to the Collectibles tab;
removes NFT loading indicator actions from props.
> - **Tests**
> - Added `useNftDetection.test.ts` and updated `NftGrid.test.tsx` and
`CollectibleDetectionModal` test to mock/use the new hook.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5eceec2. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

improve import assets UI
- Move network badge to the left of network picker
- The close icon "X" no longer appears if no search string exists, but
it will appear if they do
- Footer button "Next" for Search Tab and Custom Token tab both are
aligned and aren't being overlapped with the Android OS navigation bar

Other changes that aren't related to the tickets
- Improve multi selector layout by removing horizontal padding in parent
container

## **Changelog**

CHANGELOG entry: Improved import assets UI

## **Related issues**

Fixes:
https://consensyssoftware.atlassian.net/browse/MDP-247
https://consensyssoftware.atlassian.net/browse/MDP-246
https://consensyssoftware.atlassian.net/browse/MDP-594

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

### Main UI Changes

https://consensyssoftware.atlassian.net/browse/MDP-246

| before | after |
| -------- | ------- |
|
![before](https://github.com/user-attachments/assets/0da6da9a-ac2e-4359-a502-513e9e139404)
|
![after](https://github.com/user-attachments/assets/2d15c992-5941-4230-acbe-93d4d88dc49c)
|

### Android Button Obstruction Fix - Search Tab

https://consensyssoftware.atlassian.net/browse/MDP-594

| before | after |
| -------- | ------- |
|
![before](https://github.com/user-attachments/assets/89eec7c6-e031-43eb-871c-dc7f1f8ac7b2)
|
![after](https://github.com/user-attachments/assets/7569690c-b3dd-433d-8383-dc05a9d0d096)
|

### Android Button Obstruction Fix - Custom Token Tab

https://consensyssoftware.atlassian.net/browse/MDP-594

| before | after |
| -------- | ------- |
|
![before](https://github.com/user-attachments/assets/74cf6edf-6b58-4b37-9159-cff4943c1249)
|
![after](https://github.com/user-attachments/assets/0ea3ec3b-098e-4760-b073-79554e9a77e9)
|

### Close icon disappearing and reappearing based on search string

https://consensyssoftware.atlassian.net/browse/MDP-247


https://github.com/user-attachments/assets/1d5d5073-cad5-4d03-989a-b98e1f76e2d5


### **Before**

`~`

### **After**

`~`

## **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]
> Refines Import Assets screens with left-aligned network picker avatar,
conditional clear icon, full-width bottom-aligned Next buttons that
respect Android safe-area, and improved search field layout.
> 
> - **Import Token (Custom Token)**:
> - Apply safe-area insets (Android) to footer; wrap Next button in
`buttonWrapper` with margins and full-width `Button`.
> - Add `paddingHorizontal` to `wrapper` and refactor styles; inject
`safeAreaInsets` via HOC.
> - **Search (AssetSearch/SearchTokenAutocomplete)**:
> - Make search input full-width with absolute `Search`/`Close` icons;
show `Close` only when text exists.
> - Add margins around search input and safe-area-aware padding for
footer `Next` button.
> - **Add Asset screen**:
> - Rework network picker: move network avatar to the left of the label
and reduce arrow icon size; add spacing style.
> - Adjust container padding to align tabs/content; minor style
cleanups.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d679ae4. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

PR to fix hiding nft.

## **Changelog**


CHANGELOG entry: fixed hiding nft flow.

## **Related issues**

Fixes: #16069

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


https://github.com/user-attachments/assets/cc92ba95-8204-43cd-a205-3df3556160d5




## **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]
> <sup>[Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) is
generating a summary for commit
d303671. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@pull pull Bot locked and limited conversation to collaborators Dec 10, 2025
@pull pull Bot added the ⤵️ pull label Dec 10, 2025
@pull pull Bot merged commit dc83137 into Reality2byte:main Dec 10, 2025
2 of 36 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.

10 participants