Skip to content

feat(predict): support deposit wallet onboarding#29635

Closed
ghgoodreau wants to merge 3 commits into
mainfrom
predict/deposit-wallet-onboarding
Closed

feat(predict): support deposit wallet onboarding#29635
ghgoodreau wants to merge 3 commits into
mainfrom
predict/deposit-wallet-onboarding

Conversation

@ghgoodreau
Copy link
Copy Markdown
Contributor

Route new CLOB v2 users through Polymarket deposit wallets while preserving existing Safe users, including POLY_1271 order signing and balance sync.

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.

Route new CLOB v2 users through Polymarket deposit wallets while preserving existing Safe users, including POLY_1271 order signing and balance sync.

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

github-actions Bot commented May 2, 2026

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-swaps-and-bridge Swaps and Bridge team label May 2, 2026
ghgoodreau and others added 2 commits May 5, 2026 14:43
Co-authored-by: Cursor <cursoragent@cursor.com>
Refresh deposit wallet account state and align relayer batch deadlines with Polymarket guidance while adding focused coverage for the new wallet paths.

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

github-actions Bot commented May 6, 2026

🔍 Smart E2E Test Selection

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

E2E Test Selection:
All 13 changed files are within the app/components/UI/Predict/ directory, focused on the Polymarket prediction market integration. The changes introduce a significant new feature: "deposit wallet" account type support alongside the existing Gnosis Safe proxy wallet type.

Key changes:

  1. PredictController.ts (CRITICAL): New relayer-based claim path that returns CONFIRMED status immediately, bypassing the normal transaction confirmation flow.
  2. PolymarketProvider.ts: Major refactoring of trade execution, claim preparation, and deposit flows to branch based on wallet type (safe vs deposit-wallet). getAccountState() now detects deposit wallets for v2 protocol users.
  3. depositWallet.ts (NEW): Complete new module for deposit wallet relayer API - wallet creation, batch execution with EIP-712 signing, transaction polling, CLOB balance sync, and Permit2 fee authorization.
  4. orderCodec.ts: New signProtocolOrderForDepositWallet() function implementing ERC-1271 wrapped signatures, new POLY_1271 signature type.
  5. usePredictClaim.ts: Hook now handles CONFIRMED status to navigate back immediately for relayer-submitted claims.

Tag selection rationale:

  • SmokePredictions: Directly impacted - the entire claim, trade, and deposit lifecycle has been modified to support deposit wallets. Position opening, cashing out, and claiming winnings all go through changed code paths.
  • SmokeWalletPlatform: Required per SmokePredictions tag description - Predictions is a section inside the Trending tab, so changes to Predictions views affect Trending.
  • SmokeConfirmations: Required per SmokePredictions tag description - opening/closing positions are on-chain transactions that go through confirmations. The new relayer path may bypass confirmations for deposit wallet users, which needs validation.

No other tags are warranted as changes are entirely contained within the Predict feature area with no impact on browser, accounts, networks, swaps, snaps, or other wallet features.

Performance Test Selection:
The Predict feature's core flows have been significantly changed. The new deposit wallet account type introduces relayer polling (waitForDepositWalletTransaction with up to 10 polls at 2s intervals = up to 20s wait), new account state detection logic in getAccountState(), and new async operations in trade/claim/deposit flows. These changes could impact the responsiveness and timing of the Predict feature's balance display, deposit flows, and order execution - all of which are measured by @PerformancePredict.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@ghgoodreau ghgoodreau closed this May 11, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators May 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant