Skip to content

chore(release): merge stable into release/7.71.0; resolve CHANGELOG (#27708)#28016

Merged
chloeYue merged 9 commits into
release/7.71.0from
resolve-conflicts-changelog
Mar 27, 2026
Merged

chore(release): merge stable into release/7.71.0; resolve CHANGELOG (#27708)#28016
chloeYue merged 9 commits into
release/7.71.0from
resolve-conflicts-changelog

Conversation

@chloeYue

@chloeYue chloeYue commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Description

Merges stable into release/7.71.0 and resolves CHANGELOG.md conflicts so PR #27708 (release/7.71.0stable) can merge cleanly.

CHANGELOG resolution (per local release changelog guidelines)

  • Kept ## [7.71.0] (cleaned release notes) above ## [7.70.1] / ## [7.70.0] from stable.
  • Compare links: [Unreleased]v7.71.0...HEAD; [7.71.0]v7.70.1...v7.71.0; left [7.70.1] / [7.70.0] lines unchanged below.

After this PR

  1. Merge this PR into release/7.71.0 using Create a merge commit (not squash), per release process.
  2. Re-try / update PR #27708.

Changelog

CHANGELOG entry: null


Made with Cursor


Note

Low Risk
Low risk: merge-conflict resolution focused on CHANGELOG.md ordering/compare links with no runtime code changes.

Overview
Merges stable into release/7.71.0 and resolves the CHANGELOG.md conflict by keeping the cleaned 7.71.0 notes above 7.70.1/7.70.0 and updating the compare links ([Unreleased]v7.71.0...HEAD, [7.71.0]v7.70.1...v7.71.0).

Written by Cursor Bugbot for commit 424324a. This will update automatically on new commits. Configure here.

metamaskbot and others added 9 commits March 23, 2026 18:37
…ce change after reconnection cp-7.70.1 (#27826)

- fix(perps): fix stale data and missing price change after reconnection
(#27530)

## **Description**

Two fixes for perps foreground reconnection:

1. **Stale data after background** — `connect()` returned early when
`isConnected=true` (grace period kept state alive) without checking if
the WebSocket was dead. Fixed by adding `ensureConnected()` that always
forces disconnect + reconnect on foreground return.

2. **Price change "–%" persists after reconnect** — Prewarm called
`subscribeToPrices()` without `includeMarketData`, so `assetCtxs`
subscriptions (which provide `prevDayPx` for `percentChange24h`) were
never re-established. Fixed by moving the `assetCtxs` subscription out
of the `includeMarketData` guard in `subscribeToPrices()`. This is safe
because `assetCtxs` is 1 subscription per DEX (2-3 total), not
per-symbol. The expensive per-symbol `activeAssetCtx` subscriptions
remain gated behind `includeMarketData`.

## **Changelog**

CHANGELOG entry: Fixed stale perps data and missing 24h price change
after returning from background

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: Perps foreground reconnection

  Scenario: user returns after short background (grace period still active)
    Given user is on Perps screen with live data
    When user backgrounds app for 10s and returns
    Then data refreshes with live prices and positions
    And 24h price change % displays correctly (not "--%" )

  Scenario: user returns after long background (grace period already fired)
    Given user is on Perps screen with live data
    When user backgrounds app for 60s and returns
    Then data refreshes with live prices and positions
    And 24h price change % displays correctly (not "--%" )

  Scenario: initial mount unchanged
    Given user opens app fresh
    When user navigates to Perps
    Then connection establishes normally via connect()
    And 24h price change % displays correctly
```

## **Screenshots/Recordings**

### **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]
> **Medium Risk**
> Touches perps WebSocket lifecycle and subscription behavior;
regressions could cause extra reconnects or missed/duplicated
subscriptions, though changes are scoped and covered by updated tests.
> 
> **Overview**
> Fixes perps reconnection reliability by switching foreground handling
from `connect()` to a new `PerpsConnectionManager.ensureConnected()`
that **cancels any grace period, force-disconnects, resets ref-count,
and reconnects**, deduplicating concurrent calls.
> 
> Restores 24h % change after reconnection/prewarm by ensuring
`HyperLiquidSubscriptionService.subscribeToPrices()` always establishes
lightweight per-DEX `assetCtxs` subscriptions even when
`includeMarketData` is false; price prewarm explicitly passes
`includeMarketData: false` and documents the N² connection risk.
> 
> Updates unit tests and architecture docs to reflect
`ensureConnected()` usage and the new subscription expectations.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1549f85. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[1bf5d78](1bf5d78)

Co-authored-by: abretonc7s <107169956+abretonc7s@users.noreply.github.com>
…ure from dual-cache desync cp-7.70.1 (#27860)

- fix(perps): fix HIP-3 asset ID lookup failure from dual-cache desync
cp-7.70.1 (#27854)

## **Description**

Fix HIP-3 asset ID lookup failure (`"Asset ID not found for
xyz:BRENTOIL"`) that blocked trading on HIP-3 markets when navigating
via the old Perps tab layout.

**Root cause**: Dual-cache desync between `#cachedValidatedDexs` (string
DEX names) and `#cachedAllPerpDexs` (raw API objects for `perpDexIndex`
computation). The standalone preload path
(`#getStandaloneValidatedDexs`) populated one cache but not the other.
When `#buildAssetMapping` later ran, it found "xyz" in `dexsToMap` but
couldn't compute its `perpDexIndex` because `#cachedAllPerpDexs` was
null.

**Why old Perps tab vs new Homepage Sections**: Both layouts sit inside
`Wallet/index.tsx`, which calls `startMarketDataPreload()` on mount.
This fires standalone HTTP calls that populate `#cachedValidatedDexs`
but not `#cachedAllPerpDexs`.

- **New homepage sections**: `PerpsSectionWithProvider` mounts
immediately. Stream hooks fire `ensureReady()` before or concurrently
with the standalone preload. Since `#cachedValidatedDexs` is often still
null, `fetchValidatedDexsInternal` runs fresh and sets **both** caches
correctly.
- **Old tab layout**: The Perps tab doesn't mount until the user taps
it. By that time, `startMarketDataPreload()` has already completed →
`#cachedValidatedDexs` is populated by standalone. When the tab mounts →
`getValidatedDexs()` → **cache hit** → `fetchValidatedDexsInternal` is
never called → `#cachedAllPerpDexs` stays null → `buildAssetMapping`
can't find "xyz".

**Changes (1 file, 3 sites)**:

1. **Root cause fix**: `#getStandaloneValidatedDexs` now sets
`this.#cachedAllPerpDexs = allDexs` after a successful `perpDexs()`
call, keeping both caches in sync.
2. **Cache poisoning fix**: Removed `this.#cachedAllPerpDexs =
this.#cachedAllPerpDexs ?? [null]` from the catch block in
`#buildAssetMapping`.
3. **Cache poisoning fix**: Replaced persistent `if (!cache) { cache =
[null] }` with local `const allPerpDexs = cache ?? [null]` — consumers
read the cache, only the owner writes it.

## **Changelog**

CHANGELOG entry: Fixed a bug where closing positions on HIP-3 markets
(e.g., xyz:BRENTOIL) failed with "Asset ID not found" when navigating
via the Perps tab

## **Related issues**

Fixes: HIP-3 asset ID lookup failure on old Perps tab layout

## **Manual testing steps**

```gherkin
Feature: HIP-3 position management via Perps tab

  Scenario: user closes a HIP-3 position from the old Perps tab
    Given user has an open position on a HIP-3 market (e.g., xyz:BRENTOIL)
    And user is using the old tab layout (homepage redesign v1 disabled)

    When user navigates to the Perps tab
    And user taps close on the xyz:BRENTOIL position
    Then the position closes successfully without "Asset ID not found" error

  Scenario: user opens a HIP-3 position from the old Perps tab
    Given user is on the Perps tab (old layout)

    When user navigates to xyz:BRENTOIL market and places a market order
    Then the order executes successfully with correct asset ID routing
```

## **Screenshots/Recordings**

### **Before**

Metro logs show the desync:
```
getValidatedDexs CACHE HIT {"cachedAllNull": true, "dexs": [null, "xyz"]}
buildAssetMapping state  {"allPerpDexsLen": 1, "cachedAllNull": true}
Could not find perpDexIndex for DEX xyz
Asset ID not found for xyz:BRENTOIL
```

### **After**

Metro logs show both caches in sync:
```
buildAssetMapping state {"allPerpDexsLen": 8, "cachedAllNull": false, "dexsToMap": [null, "xyz"]}
Asset map state at order time {"assetExistsInMap": true, "hip3AssetsCount": 54, "totalAssetsInMap": 283}
Resolved DEX-specific asset ID {"assetId": 110049, "coin": "xyz:BRENTOIL"}
usePerpsClosePosition: Close result {"success": true, "orderId": "359617825254"}
```

## **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]
> **Medium Risk**
> Touches HIP-3 market routing/asset-ID mapping in
`HyperLiquidProvider`, so a mistake could break trading on some perps
markets; scope is small and localized to cache population/fallback
behavior.
> 
> **Overview**
> Fixes a HIP-3 asset mapping failure where `#cachedValidatedDexs` could
be populated via the standalone preload path while `#cachedAllPerpDexs`
stayed `null`, leading to missing `perpDexIndex` during
`#buildAssetMapping`.
> 
> `#getStandaloneValidatedDexs()` now also populates
`#cachedAllPerpDexs` after a successful `perpDexs()` call, and
`#buildAssetMapping()` no longer “poisons” the shared cache with a
persistent `[null]` fallback (it uses a local fallback instead).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c925609. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[2898ec8](2898ec8)

Co-authored-by: abretonc7s <107169956+abretonc7s@users.noreply.github.com>
## Description

Adds **7.70.1** release notes for hotfixes on `release/7.70.1`, and
updates changelog compare links per release process.

User-facing changes documented:

- Fixed stale perpetuals data and missing 24h price change after
returning from background
([#27530](#27530))
- Fixed a bug where closing positions on HIP-3 markets (e.g.,
xyz:BRENTOIL) failed with "Asset ID not found" when navigating via the
Perps tab
([#27854](#27854))

## Changelog

CHANGELOG entry: null

## Related

- Release PR:
[#27824](#27824)
(`release/7.70.1` → `stable`)
- Cherry-picks:
[#27826](#27826)
(reconnection),
[#27860](#27860) (HIP-3
/ dual-cache)

## Compare links

- `[Unreleased]` → `v7.70.1...HEAD`
- `[7.70.1]` → `v7.70.0...v7.70.1` (patch compares to previous minor
tag)
- Older version links (e.g. `[7.69.1]`) unchanged.

## Branch

- Merged current `release/7.70.1` into this branch so the changelog PR
stays aligned with
[#27824](#27824).

Merge with **Create a merge commit** (not squash), per release changelog
workflow.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: documentation-only change to `CHANGELOG.md` with no runtime
or build impact.
> 
> **Overview**
> Documents the `7.70.1` hotfix in `CHANGELOG.md`, adding two *Fixed*
items related to perpetuals market data refresh and HIP-3 perps position
closing.
> 
> Updates the changelog compare links so `Unreleased` now compares from
`v7.70.1`, and adds the new `7.70.1` compare URL.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
33bab8a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
# 🚀 v7.70.1 Testing & Release Quality Process

Hi Team,
As part of our new **MetaMask Release Quality Process**, here’s a quick
overview of the key processes, testing strategies, and milestones to
ensure a smooth and high-quality deployment.

---

## 📋 Key Processes

### Testing Strategy
- **Developer Teams:**
Conduct regression and exploratory testing for your functional areas,
including automated and manual tests for critical workflows.
- **QA Team:**
Focus on exploratory testing across the wallet, prioritize high-impact
areas, and triage any Sentry errors found during testing.
- **Customer Success Team:**
Validate new functionalities and provide feedback to support release
monitoring.

### GitHub Signoff
- Each team must **sign off on the Release Candidate (RC)** via GitHub
by the end of the validation timeline (**Tuesday EOD PT**).
- Ensure all tests outlined in the Testing Plan are executed, and any
identified issues are addressed.

### Issue Resolution
- **Resolve all Release Blockers** (Sev0 and Sev1) by **Tuesday EOD
PT**.
- For unresolved blockers, PRs may be reverted, or feature flags
disabled to maintain release quality and timelines.

### Cherry-Picking Criteria
- Only **critical fixes** meeting outlined criteria will be
cherry-picked.
- Developers must ensure these fixes are thoroughly reviewed, tested,
and merged by **Tuesday EOD PT**.

---

## 🗓️ Timeline and Milestones

1. **Today (Friday):** Begin Release Candidate validation.
2. **Tuesday EOD PT:** Finalize RC with all fixes and cherry-picks.
3. **Wednesday:** Buffer day for final checks.
4. **Thursday:** Submit release to app stores and begin rollout to 1% of
users.
5. **Monday:** Scale deployment to 10%.
6. **Tuesday:** Full rollout to 100%.

---

## ✅ Signoff Checklist

Each team is responsible for signing off via GitHub. Use the checkbox
below to track signoff completion:

# Team sign-off checklist
- [ ] Mobile Platform

This process is a major step forward in ensuring release stability and
quality. Let’s stay aligned and make this release a success! 🚀

Feel free to reach out if you have questions or need clarification.

Many thanks in advance

# Reference
- Testing plan sheet -
https://docs.google.com/spreadsheets/d/1tsoodlAlyvEUpkkcNcbZ4PM9HuC9cEM80RZeoVv5OCQ/edit?gid=404070372#gid=404070372
@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added INVALID-PR-TEMPLATE PR's body doesn't match template team-qa QA team labels Mar 27, 2026
@github-actions github-actions Bot added the risk-low Low testing needed · Low bug introduction risk label Mar 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 100%
click to see 🤖 AI reasoning details

E2E Test Selection:
No files changed - no analysis needed

Performance Test Selection:
No files changed - no performance tests needed

View GitHub Actions results

@chloeYue chloeYue merged commit a3233d2 into release/7.71.0 Mar 27, 2026
61 of 64 checks passed
@chloeYue chloeYue deleted the resolve-conflicts-changelog branch March 27, 2026 08:45
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template risk-low Low testing needed · Low bug introduction risk team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants