feat(predict): add deposit wallet claim flow#29936
Conversation
|
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. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## predict/dw-order-flow #29936 +/- ##
========================================================
Coverage ? 81.54%
========================================================
Files ? 5343
Lines ? 142148
Branches ? 32416
========================================================
Hits ? 115909
Misses ? 18302
Partials ? 7937 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a0abdbe to
2da0b25
Compare
9b5082a to
db218b3
Compare
2da0b25 to
b2bf1ee
Compare
db218b3 to
f96097e
Compare
f96097e to
c11a3c6
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
These changes directly affect the claim winnings flow in Predictions (Polymarket), specifically for deposit wallet users. The Per tag descriptions:
The changes are well-contained within the Predict domain and don't affect core infrastructure, navigation, or other wallet features. Performance Test Selection: |
|


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
WALLETbatch, 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:
beforeSignandpublish.skipInitialGasEstimateto claim confirmation batch creation.Changelog
CHANGELOG entry: Fixed Predict claims for Polymarket Deposit Wallet users.
Related issues
Fixes: PRED-859
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
Pre-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
Changes claim transaction
beforeSign/publishbehavior 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
predictClaimtransactions inPredictControllerand delegatingbeforeSign/publishto new provider hooks (beforeSignClaim,publishClaim). Deposit-wallet claims are now marked as externally signed before signing and are published via a Polymarket relayerWALLETbatch (planned by newplanDepositWalletClaim) while legacy Safe claims continue to pass through.Claim batch submission is tweaked to set
skipInitialGasEstimateand include the MATIC collateral gas token, andconfirmClaimnow triggers a best-effort deposit-wallet collateral allowance sync after claim confirmation. Tests are expanded/added acrossPredictController,PolymarketProvider, and newpreflight/claimcoverage for requirement filtering and call ordering.Reviewed by Cursor Bugbot for commit c11a3c6. Bugbot is set up for automated code reviews on this repo. Configure here.