Skip to content

[pull] main from MetaMask:main#437

Merged
pull[bot] merged 4 commits into
Reality2byte:mainfrom
MetaMask:main
Jan 8, 2026
Merged

[pull] main from MetaMask:main#437
pull[bot] merged 4 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Jan 8, 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 : )

Matt561 and others added 4 commits January 7, 2026 23:40
## **Description**

1. Adds remotely configurable dual allowlist/blocklist support for mUSD
conversion token filtering.
2. Adds support for remotely configuring which tokens to display mUSD
conversion CTAs for (e.g. USDC, USDT, DAI)

**Why:** We want full control of payment tokens for mUSD conversion and
for displaying our CTAs (e.g. highlighting stablecoins).

**Solution:** Implemented a combined allowlist + blocklist system with
wildcard support:
- Empty allowlist = allow all tokens (current behavior)
- Non-empty allowlist = only allow specified tokens
- Blocklist always takes precedence (emergency override)

See `app/components/UI/Earn/docs/wildcard-token-list.md` for full
architecture docs.

## **Changelog**

CHANGELOG entry: added remotely configurable allowlist and blocklist for
mUSD conversion tokens.

## **Related issues**

Fixes: [MUSD-136: Allow all tokens a user holds to be converted to
mUSD](https://consensyssoftware.atlassian.net/browse/MUSD-136)

## **Manual testing steps**

```gherkin
Feature: mUSD conversion token filtering

  Scenario: user sees conversion CTA only for allowed tokens
    Given the allowlist is set to {"0x1":["USDC","USDT"]}
    
    When user views USDC on Ethereum mainnet
    Then conversion CTA is displayed
    
    When user views DAI on Ethereum mainnet
    Then conversion CTA is NOT displayed
```

## **Screenshots/Recordings**

N/A - No UI changes, configuration-based filtering

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

- [ ] 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]
> Introduces configurable, wildcard-based token filtering for mUSD
conversion and CTAs with remote flag + env fallbacks.
> 
> - New `WildcardTokenList` utilities (`utils/wildcardTokenList.ts`):
`isTokenAllowed`, `isTokenInWildcardList`, `isValidWildcardTokenList`,
and `getWildcardTokenListFromConfig` with comprehensive tests
> - New selectors: `selectMusdConversionPaymentTokensAllowlist`,
`selectMusdConversionPaymentTokensBlocklist`, and
`selectMusdConversionCTATokens` (remote takes precedence; env fallback)
> - Refactors `useMusdConversionTokens` to symbol-based filtering and
CTA support: `filterAllowedTokens`, `isTokenWithCta`, `tokensWithCTAs`;
removes legacy `utils/musd` and hardcoded convertible token constants
> - UI updates to honor CTA filtering: `EarnLendingBalance` and
`TokenListItem` use `isTokenWithCta`; `pay-with-modal` uses
`filterAllowedTokens`
> - Env/sample config updated: `MM_MUSD_CONVERTIBLE_TOKENS_ALLOWLIST`,
`MM_MUSD_CONVERTIBLE_TOKENS_BLOCKLIST`, `MM_MUSD_CTA_TOKENS`; added docs
at `app/components/UI/Earn/docs/wildcard-token-list.md`
> - Test suite updated/added across hooks, selectors, and components;
removes obsolete `utils/musd` tests
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a84b0c8. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…23952)

Moved BasicFunctionalityEmptyState to shared location. Updated
PerpsTabView and Perps routes to check for basic functionality and show
empty state if disabled, preventing network requests. Fixes TAT-2102.

## **Description**

Adds an error state for when basic functionality is disabled.

## **Changelog**

CHANGELOG entry: Added a fallback for Perps users who have Basic
Functionality disabled.

## **Related issues**

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

## **Manual testing steps**
1. Go to Settings->Privacy
2. Disable Basic Functionality
3. Visit Perps and/or Predict tabs

## **Screenshots/Recordings**


https://github.com/user-attachments/assets/3f24f34c-e3ea-419a-9806-8cbe6a3736f5


https://github.com/user-attachments/assets/adc53d10-7777-4673-9029-9232965252f5

## **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 a shared, reusable empty state for when basic functionality is
disabled and integrates it into Perps to avoid initializing providers or
screens when disabled.
> 
> - New reusable `BasicFunctionalityEmptyState` (now accepts optional
`title` and `iconName`) with updated imports and design-system `Icon`
> - Perps `TabView` and route stacks now check
`selectBasicFunctionalityEnabled`; render `BasicFunctionalityEmptyState`
(with Warning icon and `perps.basic_functionality_disabled_title`)
instead of mounting providers/screens
> - `TrendingView` updated to use shared `BasicFunctionalityEmptyState`
> - `PredictOffline` icon style adjusted (`IconSize.Xl`,
`IconColor.Muted`)
> - Added `perps.basic_functionality_disabled_title` to `en.json`
> - Tests: new tests for shared `BasicFunctionalityEmptyState`; removed
old Trending-specific test
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7a5bdee. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Nick Gambino <35090461+gambinish@users.noreply.github.com>
<!--
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?
-->

This PR fixes redundant Card API requests and improves CardHome data
consistency after user actions.

- Avoids an unnecessary token refresh request immediately after a
successful Card login by skipping refresh when the access token is still
fresh.
- Ensures CardHome refetches all required data when returning from flows
that invalidate cached authenticated data (e.g., changing priority token
via Asset Selection, or updating delegation via Spending Limit) without
reintroducing duplicate fetches on initial login load.
- Updates unit tests to reflect the “fetchOnMount: false” orchestration
pattern (CardHome orchestrates fetching via `fetchAllData` /
`refetchAllData`) and to match updated polling 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: Improved Card performance by reducing redundant
authentication token refresh requests and ensuring CardHome updates
correctly after changing the spending asset or spending limit.

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: Card - authentication and CardHome data refresh

  Scenario: successful login does not immediately refresh token again
    Given the user is logged out of Card
    When the user logs in successfully
    Then Card should not immediately trigger a token refresh request if the access token is still valid (fresh)

  Scenario: CardHome refreshes data after changing the priority token
    Given the user is logged in to Card and CardHome is visible
    When the user changes the spending asset via the Asset Selection bottom sheet
    Then returning to CardHome refetches the necessary Card data and reflects the updated priority token details

  Scenario: CardHome refreshes data after updating delegation (spending limit)
    Given the user is logged in to Card and CardHome is visible
    When the user updates spending limit (delegation) on the Spending Limit screen
    Then returning to CardHome refetches the necessary Card data and reflects the updated allowance/spending limit information
```

## **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]
> Streamlines Card data loading and authentication to prevent redundant
requests and improve post-action consistency.
> 
> - Centralizes fetch orchestration in `CardHome` (waits for SDK
readiness, fetches once on mount, `useFocusEffect` refetches via
`refetchAllData` when cache is cleared) and adds `refetchAllData` to
tests
> - Disables auto-fetch in hooks (`useCardDetails`,
`useGetDelegationSettings`, `useGetCardExternalWalletDetails`,
`useGetUserKYCStatus`) by setting `fetchOnMount: false`;
`useGetCardExternalWalletDetails` uses a `ref` to avoid stale
`delegationSettings`
> - Ensures correct fetch order in `useLoadCardData`: fetch
`delegationSettings` before `externalWalletDetails`; same ordering for
`refetchAllData`
> - Updates polling behavior in `useCardDetails` tests (refreshes card
details once after provisioning)
> - Authentication: `handleLocalAuthentication` skips refresh when
access token has >5 min validity; adds comprehensive tests for boundary
cases and failures
> - Navigation: switches to design-system `ButtonIcon` API and
introduces `cardCloseOnlyNavigationOptions`; applies close-only header
to `CARD.HOME` route
> - Broad test updates across `CardHome` and hooks to align with new
fetch orchestration and auth logic
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
16564e7. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…#22927)

<!--
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**
* Implement SRP auto-suggestions bar in Onboarding and Import wallet SRP
flow.
* Add feature flag for new word bar feature.
* Jira: https://consensyssoftware.atlassian.net/browse/SL-302,
https://consensyssoftware.atlassian.net/browse/SL-361
<!--
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:Implement SRP auto-suggestions bar in Onboarding and
Import wallet SRP flow.

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: Implement SRP auto-suggestions bar in Onboarding and Import wallet SRP flow.

  Scenario: user starts typing SRP input words
    Given tries to import existing SRP in app

    When user starts typing SRP input words
    Then bip39 word bar suggestions should show.
```

## **Screenshots/Recordings**

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

### **Before**

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

### **After**


https://github.com/user-attachments/assets/aea3c941-8c27-4d04-8896-0aef446ca848



https://github.com/user-attachments/assets/ccd74fa2-05f7-4827-9585-247f35901654




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

- [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]
> Introduces an external BIP39 suggestion bar for SRP entry and wires it
into onboarding/import flows with a remote feature flag.
> 
> - New `SrpWordSuggestions` component (filters `wordlist`, shows top 5,
horizontal list) and tests
> - `ImportFromSecretRecoveryPhrase` and `ImportNewSecretRecoveryPhrase`
wrapped with `KeyboardProvider`; renders `KeyboardStickyView`
suggestions when typing and keyboard visible
> - New feature flag `importSrpWordSuggestion` (constant, selectors,
tests) to gate suggestions
> - `SrpInputGrid` emits `onCurrentWordChange`, exposes
`handleSuggestionSelect` via ref, tracks focused index, and
clears/updates current word appropriately
> - Input hardening: use `keyboardType="visible-password"`,
`textContentType="none"`, `importantForAutofill="no"`; minor style
tweaks (reduced minHeight, paste text padding)
> - Step transition refactor to single animated container in
import-from-seed view
> - Comprehensive unit tests and snapshot updates across new behavior
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
57a4bf9. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: ieow <4881057+ieow@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Jan 8, 2026
@pull pull Bot added the ⤵️ pull label Jan 8, 2026
@pull pull Bot merged commit a7537dc into Reality2byte:main Jan 8, 2026
0 of 3 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.

4 participants