Skip to content

chore(runway): cherry-pick feat: cp-7.78.0 support deposit-wallet polymarket withdraw#30250

Merged
chloeYue merged 1 commit into
release/7.78.0from
runway-cherry-pick-7.78.0-1778853001
May 15, 2026
Merged

chore(runway): cherry-pick feat: cp-7.78.0 support deposit-wallet polymarket withdraw#30250
chloeYue merged 1 commit into
release/7.78.0from
runway-cherry-pick-7.78.0-1778853001

Conversation

@runway-github
Copy link
Copy Markdown
Contributor

@runway-github runway-github Bot commented May 15, 2026

Description

Adopts the new Polymarket deposit-wallet support landed in
@metamask/transaction-pay-controller@22.5.0
so Polymarket users whose pUSD lives in a deposit wallet (a per-user
batch contract on Polygon) can withdraw cross-chain through MetaMask
Pay.

Highlights:

  • Lets Polymarket deposit-wallet users withdraw cross-chain through
    MetaMask Pay.
  • Gated behind a new remote feature flag, with the existing "withdraw
    unavailable" sheet preserved when off.
  • Polishes Predict withdraw activity rendering.

Changelog

CHANGELOG entry: null

Related issues

Manual testing steps

Feature: Polymarket deposit-wallet withdraw

  Scenario: deposit-wallet user with the flag on
    Given enableDepositWalletWithdraw is on
    And the user has a Polymarket deposit wallet with pUSD balance on Polygon
    When the user taps Withdraw on the Predict balance
    Then the standard Pay confirmation opens
    And confirming submits via the Polymarket strategy with no Polygon gas

  Scenario: deposit-wallet user with the flag off
    Given enableDepositWalletWithdraw is off
    When the user taps Withdraw on the Predict balance
    Then the existing "Withdraw unavailable" sheet is shown

Screenshots/Recordings

Before

After

Activity

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
  • I've tested with a power user scenario
  • I've instrumented key operations with Sentry traces for production
    performance metrics

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

Medium Risk
Changes withdrawal behavior and MetaMask Pay transaction configuration
for Polymarket predictWithdraw, including new controller callbacks and
retry logic; mistakes could impact withdraw routing/fees for affected
users. Gated by a remote feature flag, limiting blast radius.

Overview
Enables Polymarket deposit-wallet users to run predictWithdraw
through MetaMask Pay when the new
confirmations_pay_extended.enableDepositWalletWithdraw flag is on;
when off, the existing “withdraw unavailable” handling remains.

Updates Predict/Pay plumbing for deposit-wallet withdraws:
PredictController.prepareWithdraw now omits gasFeeToken for
deposit-wallet accounts, useTransactionPayPostQuote skips refundTo
and marks isPolymarketDepositWallet, and Transaction Pay
initialization wires new Polymarket callbacks that can derive
deposit-wallet addresses and submit deposit-wallet batches (with “wallet
busy” retries + keyring signing support).

Polishes confirmations activity rendering for predictWithdraw by
adding a dedicated predict_withdraw title and treating it as a
receive-summary type using the source token/network metadata. Tests are
added/updated accordingly, and @metamask/transaction-pay-controller is
bumped to 22.5.0.

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

[4997055](https://github.com/MetaMask/metamask-mobile/commit/4997055ba34a24c404b34d249d48474304656bfb)

…ymarket withdraw (#29953)

## **Description**

Adopts the new Polymarket deposit-wallet support landed in
[@metamask/transaction-pay-controller@22.5.0](MetaMask/core#8754)
so Polymarket users whose pUSD lives in a deposit wallet (a per-user
batch contract on Polygon) can withdraw cross-chain through MetaMask
Pay.

Highlights:

- Lets Polymarket deposit-wallet users withdraw cross-chain through
MetaMask Pay.
- Gated behind a new remote feature flag, with the existing "withdraw
unavailable" sheet preserved when off.
- Polishes Predict withdraw activity rendering.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

<!-- Internal -->

## **Manual testing steps**

```gherkin
Feature: Polymarket deposit-wallet withdraw

  Scenario: deposit-wallet user with the flag on
    Given enableDepositWalletWithdraw is on
    And the user has a Polymarket deposit wallet with pUSD balance on Polygon
    When the user taps Withdraw on the Predict balance
    Then the standard Pay confirmation opens
    And confirming submits via the Polymarket strategy with no Polygon gas

  Scenario: deposit-wallet user with the flag off
    Given enableDepositWalletWithdraw is off
    When the user taps Withdraw on the Predict balance
    Then the existing "Withdraw unavailable" sheet is shown
```

## **Screenshots/Recordings**

### **Before**

### **After**

<img width="300" alt="Activity"
src="https://github.com/user-attachments/assets/13d5a0e9-a39d-4c0a-9fde-468c5a0a7743"
/>

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

- [ ] I've tested on Android
- [ ] I've tested with a power user scenario
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics

## **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**
> Changes withdrawal behavior and MetaMask Pay transaction configuration
for Polymarket `predictWithdraw`, including new controller callbacks and
retry logic; mistakes could impact withdraw routing/fees for affected
users. Gated by a remote feature flag, limiting blast radius.
> 
> **Overview**
> Enables Polymarket *deposit-wallet* users to run `predictWithdraw`
through MetaMask Pay when the new
`confirmations_pay_extended.enableDepositWalletWithdraw` flag is on;
when off, the existing “withdraw unavailable” handling remains.
> 
> Updates Predict/Pay plumbing for deposit-wallet withdraws:
`PredictController.prepareWithdraw` now omits `gasFeeToken` for
deposit-wallet accounts, `useTransactionPayPostQuote` skips `refundTo`
and marks `isPolymarketDepositWallet`, and Transaction Pay
initialization wires new Polymarket callbacks that can derive
deposit-wallet addresses and submit deposit-wallet batches (with “wallet
busy” retries + keyring signing support).
> 
> Polishes confirmations activity rendering for `predictWithdraw` by
adding a dedicated `predict_withdraw` title and treating it as a
receive-summary type using the source token/network metadata. Tests are
added/updated accordingly, and `@metamask/transaction-pay-controller` is
bumped to `22.5.0`.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
054697c. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@runway-github runway-github Bot requested review from a team as code owners May 15, 2026 13:50
@metamaskbotv2 metamaskbotv2 Bot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label May 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - PR targets a release branch (release/*)

All E2E tests pre-selected.

View GitHub Actions results

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​metamask/​transaction-pay-controller@​22.4.0 ⏵ 22.5.09710081 +198 +1100

View full report

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@chloeYue chloeYue left a comment

Choose a reason for hiding this comment

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

LGTM

@chloeYue chloeYue merged commit c942f8a into release/7.78.0 May 15, 2026
204 of 206 checks passed
@chloeYue chloeYue deleted the runway-cherry-pick-7.78.0-1778853001 branch May 15, 2026 15:56
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size-L team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants