feat(predict): clob v2 cleanup core (testing E2E fixes)#29614
feat(predict): clob v2 cleanup core (testing E2E fixes)#29614MarioAslau wants to merge 21 commits intomainfrom
Conversation
* main: (21 commits) feat(predict): Add A/B Test Analytics Instrumentation: Bet Slip + Pay with Any Token (#29464) feat: Accounts Metrics (#29015) feat: Enable mUSD conversion flow for hardware wallet accounts (#29418) chore: QA and bug fixes from dry run apr 29 (#29519) test: remove toMatchSnapshot and removed snapshot files in unassigned code owners pt 3/3 (#29441) fix(card): initialize spending limit from saved allowance (#29517) perf(accessibility): fix iOS accessibility in Ramp components (#29126) test: e2e labels rename and shards update (#29431) test: fix missing mock (#29549) feat(rewards): add targeted Sentry capture for rewards auth errors (#29545) feat: track token_security_type_destination in metrics (#29381) fix(bridge): hide sponsored label on cross-chain bridge with insufficient balance (#29490) ci: fix scheduled e2e runs (#29539) chore: Bump `snaps-controllers` (#29486) chore: add buy/sell trade markers to trader position chart (#29478) fix(rewards): leaderboard split view (#29500) perf(accessibility): fix iOS accessibility in shared components for p… (#29119) ci: switch OTA hotfix release branch to `-ota` suffix convention (#29353) ci: fix `get-requirements.yml` checks for `pull_request` events (#29528) feat: added developer options button to clear dismissed mUSD conversion asset details CTAs (#29510) ...
* main: feat: add Tempo chain as additionnal network (#29515) feat: add token list security badges (#29509) fix: percentage buttons for money account withdraw (#29339) feat(predict): Add Funds / Change Payment Method CTA (#29461) chore: enable swaps asset picker security tags (#29570) test: mock accounts v4 transactions endpoint (#29569) feat: money account transaction - add default value for accountOverride (#29332) fix: Refine Perps section and empty state patterns to match Home and Money (#29009)
This reverts commit c209fe7.
This reverts commit 1ecd652.
This reverts commit 87192d8.
This reverts commit 20ac05f.
|
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The risk is high because this is a fundamental protocol change affecting the collateral token address used across all Predict flows (deposit, withdraw, claim, trade). The feature flag Performance Test Selection: |
|



Description
This PR removes legacy Predict Polymarket CLOB v1 support and completes the pUSD migration in Predict-owned code.
It includes:
pUSD + legacy USDC.e).Stack note: this PR is stacked on the confirmations-only pUSD PR so the diff stays limited to Predict-owned files.
Changelog
CHANGELOG entry: Updated Predict to use pUSD and the Polymarket CLOB v2 protocol.
Related issues
Fixes: PRED-851 , PRED-852
Manual testing steps
Screenshots/Recordings
Before
N/A — code-only protocol migration PR; no screenshots captured.
After
N/A — code-only protocol migration PR; no screenshots captured.
Testing
yarn lint:tscyarn jest app/components/UI/Predict/providers/polymarket/protocol/definitions.test.ts app/components/UI/Predict/providers/polymarket/protocol/orderCodec.test.ts app/components/UI/Predict/providers/polymarket/protocol/transport.test.ts app/components/UI/Predict/providers/polymarket/preflight/v2AllowanceRequirements.test.ts app/components/UI/Predict/providers/polymarket/preflight/withdraw.test.ts app/components/UI/Predict/providers/polymarket/preflight/workflows.test.ts app/components/UI/Predict/providers/polymarket/PolymarketProvider.test.ts app/components/UI/Predict/controllers/PredictController.test.ts app/components/UI/Predict/hooks/usePredictBalanceTokenFilter.test.ts app/components/UI/Predict/hooks/usePredictRewards.test.ts app/components/UI/Predict/views/PredictBuyWithAnyToken/components/PredictPayWithRow/PredictPayWithRow.test.tsx --runInBand --forceExitPre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Updates Predict transaction batching to use the v2 collateral (pUSD) as the
gasFeeTokenand switches rewards fee-asset IDs to pUSD, which can impact on-chain transaction submission and points estimation. Also changes balance-row display metadata and removeshasAllowancesfrom account-state expectations, so regressions would mainly show up in Predict payment UI/state handling.Overview
Predict now uses the CLOB v2 collateral (
MATIC_CONTRACTS_V2.collateral, i.e. pUSD) when submitting claim/withdraw transaction batches by setting it as thegasFeeToken.The Predict payment token list row is updated to be pUSD-centric: it pulls the pUSD token image, shows the formatted balance as the row description, and labels the fiat description as
pUSD.Rewards estimation requests now report the fee asset as
POLYGON_PUSD_CAIP_ASSET_ID(and corresponding comment/test updates), andusePredictAccountStatetests/docs are aligned to no longer expecthasAllowancesin returnedAccountState.Reviewed by Cursor Bugbot for commit f259c47. Bugbot is set up for automated code reviews on this repo. Configure here.