Skip to content

[pull] main from MetaMask:main#436

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

[pull] main from MetaMask:main#436
pull[bot] merged 5 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull
Copy link
Copy Markdown

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

bfullam and others added 5 commits January 7, 2026 18:38
<!--
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**

Bump bridge controller

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

- [ ] 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]
> Upgrades bridge controller and syncs dependency graph.
> 
> - Bumps `@metamask/bridge-controller` from `^64.2.0` to `^64.3.0` in
`package.json`
> - Updates `yarn.lock` to `64.3.0` and aligns transitive deps:
`@metamask/controller-utils` (`^11.17.0`),
`@metamask/network-controller` (`^27.1.0`),
`@metamask/remote-feature-flag-controller` (`^4.0.0`),
`@metamask/snaps-controllers` (`^17.2.0`), and `@metamask/utils`
(`^11.9.0`)
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9729616. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…24293)

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

After the HIP-3 refactor that replaced webData3 with individual
clearinghouseState/openOrders subscriptions, HIP-3 market positions were
not showing up on initial load. Additionally, when they did appear
(e.g., after switching accounts), there was a ~1 second delay between
crypto perps and HIP-3 positions appearing.

**Root Cause**

A race condition between subscription creation and DEX discovery:
1. HyperLiquidSubscriptionService initializes with empty `enabledDexs`
subscribeToPositions() creates subscriptions using empty `enabledDexs`
(main DEX only)
2. DEX discovery runs asynchronously via `buildAssetMapping()`
3. `updateFeatureFlags()` is called with discovered DEXs, but
subscriptions already exist for main DEX only
4. HIP-3 positions never appear because no subscriptions were created
for HIP-3 DEXs

**Solution**

1. Promise-based DEX discovery wait
Added `dexDiscoveryPromise` and `dexDiscoveryResolver `fields
`createUserDataSubscription()` waits for DEX discovery when HIP-3 is
enabled but `enabledDexs` is empty
`updateFeatureFlags()` resolves the promise when DEXs are discovered
5-second timeout prevents indefinite waiting
2. Synchronized position subscription notifications
Added `expectedDexs` and `initializedDexs` tracking sets
`aggregateAndNotifySubscribers()` waits for ALL expected DEXs to send
initial data before notifying
Ensures crypto and HIP-3 positions appear simultaneously
3. Consistent position ordering
Modified aggregation to always show main DEX (crypto perps) first, then
HIP-3 positions

**Error handling:**

1. Failed DEX subscriptions are removed from `expectedDexs` so they
don't block notifications for other DEXs
2. Both `ensureClearinghouseStateSubscription` and
`ensureOpenOrdersSubscription` mark DEXs as initialize

Changes to `HyperLiquidSubscriptionService.ts`:

- Added DEX discovery synchronization promise mechanism
- Added expectedDexs/initializedDexs tracking for synchronized
notifications
- Added wait logic in createUserDataSubscription() for HIP-3 DEX
discovery
- Modified aggregateAndNotifySubscribers() to wait for all DEXs before
notifying
- Modified aggregation ordering to put main DEX first
- Added initializedDexs.add() to both subscription callbacks
- Added expectedDexs.delete() in catch blocks for failed subscriptions
- Added cleanup for tracking state in
cleanupSharedWebData3Subscription()
- Updated tests to call updateFeatureFlags() to simulate DEX discovery
before subscribing in HyperLiquidSubscriptionService.test.ts

## **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: Fixes bug where hip3 positions were not loaded on
initial PerpsContext load

## **Related issues**

Fixes: 

## **Manual testing steps**

Verified crypto and HIP-3 positions appear simultaneously on initial
load
Verified position ordering (crypto first, HIP-3 second)
Verified account switching still works correctly
Verified that TP/SL still works as intended

## **Screenshots/Recordings**


https://github.com/user-attachments/assets/e70a47f5-f6e7-4b0b-931b-d8d666806511

## **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]
> Improves HIP-3 multi-DEX handling and subscription lifecycle to
deliver consistent, aggregated user data.
> 
> - Introduces DEX discovery synchronization (`waitForDexDiscovery`) and
resolves pending waits in `updateFeatureFlags`
> - Tracks `expectedDexs`/`initializedDexs` to delay notifications until
all DEXs send initial data; orders aggregation preserves main DEX first
> - When HIP-3 is enabled, establishes per-DEX `clearinghouseState` and
`openOrders` subscriptions upon feature-flag updates if user-data
subscribers exist
> - `subscribeTo...` waits for DEX discovery before creating HIP-3
subscriptions; error paths avoid blocking other DEX updates
> - Aggregation and caches updated to merge per-DEX
positions/orders/account; clearing `clearAll` resets DEX tracking
> - Tests adjusted to simulate DEX discovery and verify restoration and
TP/SL inclusion in orders
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
67f8a9a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

Flips logical order of buttons on last screen of perps onboarding

## **Changelog**

CHANGELOG entry: Flip logical order of buttons on last screen of perps
onboarding

## **Related issues**

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

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

<img width="426" height="859" alt="Screenshot 2026-01-06 at 11 19 09 AM"
src="https://github.com/user-attachments/assets/95e423e9-ce7e-434d-83f9-abdb3f706097"
/>

## **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]
> Reorders footer actions in `PerpsTutorialCarousel.tsx` to prioritize
the primary call-to-action.
> 
> - Places `Continue` (Primary) before `Learn more` (Secondary) on the
final screen; skip logic remains unchanged
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
714fb45. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

Show the Swaps CTA for EVM assets on the asset details page because
tokens on the Trending list will not be in
`SwapsController.swapsTokens`.

The previous logic checked if a token was in the swapsTokens list, but
trending tokens from search aren't added to that list, so the Swap
button was hidden for those tokens.

## **Changelog**

CHANGELOG entry: Fixed Swap button not showing for trending tokens on
asset details page

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/SWAPS-3687

## **Manual testing steps**

```gherkin
Feature: Swaps CTA on trending token details

  Scenario: user views a trending token from search
    Given app is on the home screen

    When user searches for a trending token and taps on it
    Then the Swap button should be visible on the asset details page
```

## **Screenshots/Recordings**

### **Before**

<!-- Swap button not visible for trending tokens -->

### **After**

<!-- Swap button visible for trending tokens -->



https://github.com/user-attachments/assets/55cd9fd4-1a24-436e-af4a-ff8924d071c3



## **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]
> Ensures the Swap button is visible for EVM assets, including trending
tokens from search, by simplifying the allow logic and removing
dependency on `swapsTokens`.
> 
> - Updates `getIsSwapsAssetAllowed` to return true for non-native EVM
assets; ETH/native still gated by `isSwapsAllowed`; Solana/Tron
explicitly allowed
> - Removes `swapsTokens` prop and `swapsTokensMultiChainObjectSelector`
usage from `Asset/index.js` and `mapStateToProps`
> - Adjusts `getIsSwapsAssetAllowed` tests to reflect new logic (remove
`swapsTokens` cases; assert true for other EVM tokens)
> - Keeps discovery-based allowlist via `searchDiscoverySwapsTokens`
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
211868a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

Converted the Edit Account Name screen from a bottom sheet modal to a
full-page drill-down view with horizontal page transitions.

### Changes:
- Replaced bottom sheet components with full-screen View layout in
`EditMultichainAccountName.tsx`
- Added horizontal (right-to-left) slide transition animation via
navigator configuration
- Remove close ("X") button

## **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: Updated Edit Account Name to display as a full-page
drill-down with right-to-left transition and back button instead of a
bottom sheet modal

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MDP-318

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


https://github.com/user-attachments/assets/da6ad976-8213-420c-a942-fa2f585de877

| before | after |
| -------- | ------- |
|
![before](https://github.com/user-attachments/assets/562dbbe5-af00-488b-845d-f343fce6091b)
|
![after](https://github.com/user-attachments/assets/98cd778d-f2e2-4a2a-b0bd-f659d51692c4)
|

### **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]
> Transitions the multichain “Edit Account Name” UI from a modal bottom
sheet to a full-screen drill-down, with updated navigation and tests.
> 
> - Registers
`Routes.SHEET.MULTICHAIN_ACCOUNT_DETAILS.EDIT_ACCOUNT_NAME` in the
`ACCOUNT_GROUP_DETAILS` stack; removes it from the modal
`MultichainAccountDetailActions` flow
> - Updates navigations in `BaseAccountDetails` and
`MultichainAccountActions` to route via
`Routes.MULTICHAIN_ACCOUNTS.ACCOUNT_GROUP_DETAILS` with nested
`EDIT_ACCOUNT_NAME`
> - Refactors `EditMultichainAccountName.tsx` from BottomSheet to
full-screen layout: adds header back button, safe area handling,
keyboard avoiding, and full-width primary save button; updates styles
> - Adjusts `AccountGroupDetails` to navigate directly to
`EDIT_ACCOUNT_NAME`
> - Updates tests (`App.test.tsx`, `BaseAccountDetails` tests,
`AccountGroupDetails` tests, `MultichainAccountActions` tests) to
reflect new routes and behaviors (including closing modal before
navigating)
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
680fcaa. 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 Jan 7, 2026
@pull pull Bot added the ⤵️ pull label Jan 7, 2026
@pull pull Bot merged commit b0c762a into Reality2byte:main Jan 7, 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.

4 participants