fix: Predict withdraw beforeSign handling#29968
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. |
9c03228 to
64c10b4
Compare
64c10b4 to
5681381
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
This directly impacts the Predictions withdraw/cash-out flow, which is covered by SmokePredictions. Per the tag dependency rules:
No other areas are affected - the changes are purely within the PredictController's beforeSign logic with no UI, navigation, or other controller changes. Performance Test Selection: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29968 +/- ##
==========================================
+ Coverage 81.54% 81.79% +0.25%
==========================================
Files 5343 5393 +50
Lines 142128 143855 +1727
Branches 32411 32852 +441
==========================================
+ Hits 115899 117669 +1770
+ Misses 18299 18162 -137
- Partials 7930 8024 +94 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



Summary
beforeSignso it only signs the active withdraw transaction.Changelog
CHANGELOG entry: Fixed Predict withdraw signing when withdraw transaction calldata is already prepared.
Note
Medium Risk
Touches transaction pre-signing for Predict withdrawals, which can affect what data gets signed and where it is sent. Changes are well-scoped with added unit coverage, but mistakes could block withdrawals or sign incorrect transactions.
Overview
Predict withdraw
beforeSignnow only runssignWithdrawfor the currently active withdraw transaction (bytransactionId) and reuses that active state when settingto/updating tx params.It also skips signing when the nested withdraw calldata is not an ERC-20
transferselector (e.g., already-prepared Safe execution calldata from MetaMask Pay), and adds unit tests covering stale transaction IDs, pre-signed calldata pass-through, and updated call-data expectations.Reviewed by Cursor Bugbot for commit 5681381. Bugbot is set up for automated code reviews on this repo. Configure here.