Skip to content

release: 7.76.3#29995

Merged
chloeYue merged 21 commits into
stablefrom
release/7.76.3-ota
May 13, 2026
Merged

release: 7.76.3#29995
chloeYue merged 21 commits into
stablefrom
release/7.76.3-ota

Conversation

@chloeYue
Copy link
Copy Markdown
Contributor

@chloeYue chloeYue commented May 11, 2026

Description

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

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

Before

After

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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.

Note

High Risk
High risk because it changes Predict transaction publish/sign flows and adds a new relayer-backed Deposit Wallet path for deposits, orders, and claims, which can affect on-chain transaction behavior and user funds. It also introduces new async side effects (preflight, polling, allowance sync) that could impact reliability if edge cases are missed.

Overview
Predict now supports Polymarket “Deposit Wallet” accounts alongside legacy Safe behavior, including routing account state based on legacy Safe deployment/activity, deriving deposit-wallet addresses, and updating balance/position/activity lookups accordingly.

Transaction lifecycle handling is expanded: PredictController exposes new beforePublish and publish hooks, adds deposit-wallet preflight before publishing deposits, publishes deposit-wallet claims via provider relayer batches, and ensures deposit/depositAndOrder confirmations invalidate cached account state and sync CLOB balance-allowance before placing follow-on orders.

User-facing safeguards/tests: Predict’s balance UI disables/blocks withdrawals for deposit-wallet users (with a new “withdrawals unavailable” bottom sheet) while keeping the legacy Safe withdraw flow, and adds extensive unit tests plus a new depositWallet module with relayer envelope calls, polling, and allowance-sync utilities.

Reviewed by Cursor Bugbot for commit 58c8b05. Bugbot is set up for automated code reviews on this repo. Configure here.

@chloeYue chloeYue requested review from a team as code owners May 11, 2026 17:32
@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.

@metamaskbotv2 metamaskbotv2 Bot added the team-qa QA team label May 11, 2026
@chloeYue chloeYue added team-mobile-delivery and removed team-qa QA team labels May 11, 2026
@chloeYue chloeYue marked this pull request as draft May 11, 2026 17:32
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 11, 2026

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

Comment thread .github/workflows/prod-build-env-notify.yml
Comment thread android/.project
runway-github Bot and others added 2 commits May 12, 2026 09:34
…29996)

- feat(predict): add confirmation hook plumbing (#29914)

## **Description**

This PR adds minimal Predict confirmation hook plumbing needed by the
upcoming Polymarket Deposit Wallet migration.

It wires TransactionController confirmation lifecycle hooks to
PredictController while keeping Predict behavior as passthrough by
default:

- `beforePublish` delegates to `PredictController.beforePublish`, which
currently returns `true`.
- `publish` delegates to `PredictController.publish` before Transaction
Pay / 7702 / Smart Transactions, and continues normal publishing when
Predict returns no transaction hash.
- If a future Predict publish implementation returns `{ transactionHash,
isIntentComplete: true }`, TransactionController marks the latest
transaction meta as `isIntentComplete` before returning the hash.

This PR intentionally contains no Polymarket Deposit Wallet business
logic. It is a small foundation PR for confirmation-team review.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes: N/A — preparatory plumbing for the Predict Deposit Wallet
migration.

## **Manual testing steps**

```gherkin
Feature: Predict confirmation hook plumbing

  Scenario: non-Predict transactions continue through the normal publish flow
    Given a transaction is published through TransactionController
    And PredictController.publish returns no transaction hash

    When the publish hook runs
    Then Transaction Pay / 7702 / Smart Transaction publishing continues as before

  Scenario: Predict publish can complete a transaction intent
    Given PredictController.publish returns a transaction hash and isIntentComplete

    When the publish hook runs
    Then normal publishing is short-circuited
    And the latest TransactionController transaction meta is marked intent complete
```

Local validation run:

```bash
yarn jest app/core/Engine/controllers/transaction-controller/transaction-controller-init.test.ts app/components/UI/Predict/controllers/PredictController.test.ts --runInBand
yarn lint:tsc
```

## **Screenshots/Recordings**

N/A — no UI changes.

### **Before**

N/A

### **After**

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
- [ ] 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.

#### Performance checks (if applicable)

- [x] I've tested on Android
- N/A — hook plumbing only, no UI/runtime performance path manually
exercised.
- [x] I've tested with a power user scenario
  - N/A — hook plumbing only, no account/token rendering path changed.
- [x] I've instrumented key operations with Sentry traces for production
performance metrics
  - N/A — this PR only adds passthrough hook plumbing.

For performance guidelines and tooling, see the [Performance

Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).

## **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 transaction publishing lifecycle by adding new hooks and a
short-circuit path, which could affect submission ordering and
integration with Pay/7702/Smart Transactions if miswired. Default
behavior remains passthrough, reducing blast radius.
> 
> **Overview**
> Adds Predict-specific confirmation hook plumbing into the transaction
submission lifecycle. TransactionController init now calls
`PredictController:beforePublish` as a new `hooks.beforePublish`, and
calls `PredictController:publish` at the start of `hooks.publish`,
**short-circuiting** the rest of the publish pipeline when Predict
returns a `transactionHash`.
> 
> Updates PredictController to expose new messenger methods
(`beforePublish`, `publish`) with default passthrough implementations,
extends messenger action typings/permissions accordingly, and adds unit
tests verifying delegation, call ordering, and the short-circuit
behavior.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
3f9d618. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[e5a8b17](e5a8b17)

Co-authored-by: Luis Taniça <matallui@gmail.com>
metamaskbot and others added 10 commits May 12, 2026 10:04
…30033)

- feat(predict): add deposit wallet claim flow (#29936)

## **Description**

Adds Deposit Wallet support for the Predict claim flow.

Polymarket Deposit Wallet users still create a normal MetaMask claim
confirmation so the transaction is visible in activity, but the signed
confirmation transaction is not published directly. Instead, Predict
intercepts pending claim transactions in the publish hook, submits the
actual claim calls as a Polymarket Deposit Wallet relayer `WALLET`
batch, waits only until the relayer returns a transaction hash, and
returns that hash to TransactionController.

This PR preserves legacy Safe claim behavior: Safe users continue to
sign and publish the existing Safe claim transaction path.

Key changes:
- Add Deposit Wallet claim planning that builds relayer calls from
claimable positions.
- Mark Deposit Wallet claim confirmation transactions as externally
signed before signing.
- Publish Deposit Wallet claims through the relayer batch and return as
soon as a transaction hash is available.
- Trigger best-effort CLOB balance-allowance sync after confirmed
claims.
- Wire Predict pending-claim context into `beforeSign` and `publish`.
- Add `skipInitialGasEstimate` to claim confirmation batch creation.

## **Changelog**

CHANGELOG entry: Fixed Predict claims for Polymarket Deposit Wallet
users.

## **Related issues**

Fixes:
[PRED-859](https://consensyssoftware.atlassian.net/browse/PRED-859)

## **Manual testing steps**

```gherkin
Feature: Predict Deposit Wallet claim flow

  Scenario: Deposit Wallet user claims resolved positions
    Given a Predict user is routed to a Polymarket Deposit Wallet
    And the user has claimable positions
    When the user starts the claim flow
    Then MetaMask shows the normal claim confirmation
    When the user approves the confirmation
    Then the claim is submitted through the Polymarket Deposit Wallet relayer
    And MetaMask activity tracks the returned transaction hash

  Scenario: legacy Safe user claims resolved positions
    Given a Predict user is routed to a legacy Safe wallet
    And the user has claimable positions
    When the user approves the claim confirmation
    Then the existing Safe claim publish path is used
```

## **Screenshots/Recordings**

### **Before**

N/A

### **After**

N/A

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

#### Performance checks (if applicable)

- [ ] I've tested on Android
  - Ideally on a mid-range device; emulator is acceptable
- [ ] I've tested with a power user scenario
- Use these [power-user

SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and

[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example

For performance guidelines and tooling, see the [Performance

Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).

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


[PRED-859]:

https://consensyssoftware.atlassian.net/browse/PRED-859?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes claim transaction `beforeSign`/`publish` behavior and
introduces a new relayer-based submission path for deposit-wallet users,
which could affect transaction lifecycle and activity tracking if
metadata or batch matching is wrong.
> 
> **Overview**
> Adds **deposit-wallet support for Predict claims** by intercepting
pending `predictClaim` transactions in `PredictController` and
delegating `beforeSign`/`publish` to new provider hooks
(`beforeSignClaim`, `publishClaim`). Deposit-wallet claims are now
marked as *externally signed* before signing and are published via a
Polymarket relayer `WALLET` batch (planned by new
`planDepositWalletClaim`) while legacy Safe claims continue to pass
through.
> 
> Claim batch submission is tweaked to set `skipInitialGasEstimate` and
include the MATIC collateral gas token, and `confirmClaim` now triggers
a best-effort deposit-wallet collateral allowance sync after claim
confirmation. Tests are expanded/added across `PredictController`,
`PolymarketProvider`, and new `preflight/claim` coverage for requirement
filtering and call ordering.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
c11a3c6. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[3751d9a](3751d9a)

[PRED-859]:
https://consensyssoftware.atlassian.net/browse/PRED-859?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: Luis Taniça <matallui@gmail.com>
…30036)

- fix(predict): disable Deposit Wallet withdrawals (#29941)

## **Description**

Temporarily disables the Predict withdraw entry point for Deposit Wallet
users until Deposit Wallet withdrawals are fully supported.

Deposit Wallet users with a Predict balance now see a dismissible bottom
sheet explaining that withdrawals are currently unavailable and to
contact Customer Service for assistance. Legacy/Safe users continue
through the existing withdraw flow.

This is intentionally a temporary UI guard and should be removed once
Deposit Wallet withdraw support ships.

## **Changelog**

CHANGELOG entry: Fixed Predict withdrawals to show a temporary
unavailable message for Deposit Wallet users.

## **Related issues**

Fixes:
[PRED-869](https://consensyssoftware.atlassian.net/browse/PRED-869)

## **Manual testing steps**

```gherkin
Feature: Predict Deposit Wallet withdrawals

  Scenario: Deposit Wallet user sees withdrawals unavailable notice
    Given a Predict Deposit Wallet user has an available balance
    When user taps Withdraw on the Predict balance card
    Then a bottom sheet is displayed with the title "Withdrawals are currently unavailable"
    And the bottom sheet description says "For assistance withdrawing your funds, please contact Customer Service."
    And tapping "Got it" dismisses the bottom sheet

  Scenario: Safe user keeps the existing withdraw flow
    Given a Predict Safe user has an available balance
    When user taps Withdraw on the Predict balance card
    Then the existing withdraw flow is opened
    And the withdrawals unavailable bottom sheet is not displayed
```

Validation run locally:

- `yarn lint:tsc`
- `yarn eslint

app/components/UI/Predict/components/PredictWithdrawUnavailableSheet/PredictWithdrawUnavailableSheet.tsx

app/components/UI/Predict/components/PredictWithdrawUnavailableSheet/PredictWithdrawUnavailableSheet.test.tsx
--cache`
- `yarn jest

app/components/UI/Predict/components/PredictWithdrawUnavailableSheet/PredictWithdrawUnavailableSheet.test.tsx
--runInBand` printed PASS for all tests, then hit the known local Jest
OOM after completion.

## **Screenshots/Recordings**

### **Before**

N/A - PR changes the Deposit Wallet withdraw press behavior from
launching unsupported withdraw handling to displaying a temporary
unavailable bottom sheet.

### **After**

Manually verified in the iOS simulator: Deposit Wallet users see the
withdrawals unavailable bottom sheet and can dismiss it with "Got it".

<img width="300" alt="Simulator Screenshot - mm-blue - 2026-05-08 at 20
39 36"

src="https://github.com/user-attachments/assets/544500b4-2456-4dfd-b6af-e56bbb844c41"
/>


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

#### Performance checks (if applicable)

- [x] N/A - no performance-sensitive code path changed; Android
performance testing is not applicable.
  - Ideally on a mid-range device; emulator is acceptable
- [x] N/A - no performance-sensitive code path changed; power-user
scenario testing is not applicable.
- Use these [power-user

SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [x] N/A - no new production performance instrumentation is required
for this temporary UI guard.
- See [`trace()`](/app/util/trace.ts) for usage and

[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example

For performance guidelines and tooling, see the [Performance

Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).

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


[PRED-869]:

https://consensyssoftware.atlassian.net/browse/PRED-869?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes the withdrawal entry point behavior in the Predict balance
card based on detected wallet type, which can block or allow access to a
funds-moving flow. Risk is mitigated by added unit/E2E coverage and a
conservative default that disables withdraw while account state is
unknown.
> 
> **Overview**
> **Disables Predict withdrawals for Deposit Wallet users** by gating
the `Withdraw` button on `usePredictAccountState` and routing Deposit
Wallet presses to a temporary “withdrawals unavailable” bottom sheet.
> 
> Adds the new `PredictWithdrawUnavailableSheet` component (with i18n
strings and test IDs) and wires it into `PredictFeed` so it can be
opened via a ref callback; Safe/legacy users continue to call
`withdraw()` as before, and the Withdraw button is disabled until wallet
type is resolved.
> 
> Updates unit tests and Detox/E2E mocks to cover wallet-type branching
and keep the withdraw smoke test on the legacy Safe path (new
`LEGACY_SAFE_WALLET_ADDRESS` + `POLYMARKET_LEGACY_SAFE_ACCOUNT_MOCKS`).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
c60a694. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[b44e29a](b44e29a)

[PRED-869]:
https://consensyssoftware.atlassian.net/browse/PRED-869?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[PRED-869]:
https://consensyssoftware.atlassian.net/browse/PRED-869?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: Luis Taniça <matallui@gmail.com>
@chloeYue chloeYue marked this pull request as ready for review May 12, 2026 13:00
vpintorico
vpintorico previously approved these changes May 12, 2026
## **Description**

Adds a `7.76.3` section to `CHANGELOG.md` covering the 5 cherry-picked
PRs on `release/7.76.3-ota`

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Cherry-picked PRs included in `release/7.76.3-ota`:
- #29914 — feat(predict): add confirmation hook plumbing
- #29917 — feat(predict): add deposit wallet deposit foundation
- #29933 — feat(predict): add Deposit Wallet order flow
- #29936 — feat(predict): add deposit wallet claim flow
- #29941 — fix(predict): disable Deposit Wallet withdrawals



## **Screenshots/Recordings**

### **Before**

N/A

### **After**

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.

Made with [Cursor](https://cursor.com)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk documentation-only change: updates `CHANGELOG.md` release
notes and compare links with no runtime or logic impact.
> 
> **Overview**
> Adds a new `7.76.3` section to `CHANGELOG.md` documenting the Predict
Polymarket Deposit Wallet work (deposit/order/claim flows, publishing
hooks) and the temporary withdrawal disablement for deposit-wallet
users.
> 
> Updates the footer compare links so `[Unreleased]` now compares from
`v7.76.3`, and adds the `[7.76.3]` compare link (`v7.76.0...v7.76.3`).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
271161b. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Cursor <cursoragent@cursor.com>
## **Description**

Re-enables the `ci` workflow on pull requests whose base is `stable`
(the release `release/X.Y.Z -> stable` PRs).

PR
[#29305](https://github.com/MetaMask/metamask-mobile/pull/29305/changes#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03f)
accidentally added `branches-ignore: stable` in
`.github/workflows/ci.yml`, which makes the workflow refuse to run on
any PR whose base branch is `stable`.

We have branch protection on `stable`, which requires the `Check all
jobs pass` and `All jobs pass` status checks.
So `Check all jobs pass` / `All jobs pass` never appeared (no `ci` run)
on the release PR :
#29584, so the release
PR currently cannot be merged.


## **Changelog**

CHANGELOG entry: null

## **Related issues**

Refs: #29584 (release/7.76.0 PR currently blocked by the missing CI
checks)
Refs: #29305 (introduced the regression)


## **Manual testing steps**

N/A 

## **Screenshots/Recordings**

### **Before**

N/A

### **After**

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.

#### Performance checks (if applicable)

- [x] I've tested on Android
  - Ideally on a mid-range device; emulator is acceptable
- [x] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [x] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example

For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).

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

<!-- Generated with the help of the pr-description AI skill -->

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: only adjusts GitHub Actions trigger filters so CI runs on
`stable`-based pull requests again, with no production code changes.
> 
> **Overview**
> Re-enables the `ci` GitHub Actions workflow for pull requests
targeting `stable` by removing the `pull_request.branches-ignore:
stable` filter, allowing required CI checks to run on release PRs again.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
6e0ed20. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b7cbce7. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePredictions, SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: @PerformancePredict
  • Risk Level: high
  • AI Confidence: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR introduces significant changes to the Polymarket/Predictions feature with a new deposit wallet architecture:

  1. SmokePredictions (primary): The core changes are in the Predictions/Polymarket feature area:

    • New beforePublish and publish methods in PredictController for deposit wallet claim flows
    • Refactored beforeSign to handle both withdraw and claim scenarios
    • New PolymarketProvider.getAccountState logic distinguishing legacy Safe vs deposit wallet wallet types
    • New depositWallet.ts with deposit wallet address derivation, batch execution, and relayer interaction
    • New PredictWithdrawUnavailableSheet component for deposit wallet users
    • PredictBalance UI changes with isWithdrawDisabled state and wallet type detection
    • E2E test updates: predict-withdraw.spec.ts now uses POLYMARKET_LEGACY_SAFE_ACCOUNT_MOCKS to keep the test on the legacy Safe path
    • New mock helpers: POLYMARKET_LEGACY_SAFE_ACCOUNT_MOCKS, POLYMARKET_ACTIVITY_MOCKS, LEGACY_SAFE_WALLET_ADDRESS
    • All existing predict smoke tests (withdraw, cash-out, claim, open position, etc.) need validation
  2. SmokeWalletPlatform (required by SmokePredictions tag description): Predictions is a section inside the Trending tab, so changes to Predictions views affect Trending/WalletPlatform tests.

  3. SmokeConfirmations (required by SmokePredictions tag description): The TransactionController init was modified to add a new beforePublish hook that delegates to PredictController:beforePublish, and the publishHook now first calls PredictController:publish before proceeding to pay/smart transaction hooks. These changes to the transaction publish pipeline could affect any confirmation flow. The tag description for SmokePredictions explicitly states to also select SmokeConfirmations since opening/closing positions are on-chain transactions.

The OTA version bump (v7.76.3) and CHANGELOG changes are non-functional. The locales/en.json changes add new strings for the withdraw unavailable sheet UI.

Performance Test Selection:
The Predictions feature has significant changes to the account state loading logic in PolymarketProvider.getAccountState(), which now makes additional network calls (checking legacy Safe deployment, fetching Polymarket activity, checking deposit wallet deployment) before returning account state. This could impact the performance of the Predict market loading and balance display. The @PerformancePredict tag covers prediction market list loading, market details, deposit flows, and balance display - all of which are affected by the new account state resolution logic.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
78.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@chloeYue chloeYue added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label May 13, 2026
@chloeYue chloeYue merged commit 9ac14e3 into stable May 13, 2026
185 of 198 checks passed
@chloeYue chloeYue deleted the release/7.76.3-ota branch May 13, 2026 14:39
@github-actions github-actions Bot locked and limited conversation to collaborators May 13, 2026
@chloeYue chloeYue restored the release/7.76.3-ota branch May 13, 2026 16:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size-XL skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-mobile-delivery

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants