feat(perps): add Perps Withdraw confirmation flow and post-quote config#28046
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. |
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring alerts on:
|
610beed to
bca8426
Compare
bca8426 to
e710e8b
Compare
e710e8b to
df9be88
Compare
|
@SocketSecurity ignore npm/@metamask/snaps-controllers@19.0.0 |
df9be88 to
4bb2092
Compare
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
d67fbe6 to
f9ec71e
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
|




Description
Wires up the confirmation UI and post-quote logic so that
perpsWithdrawtransactions go through the correct gasless HyperLiquid withdrawal flow via Relay.This is the second of two PRs for Perps Withdraw (follows the first one which added activity/display support).
Changes
useTransactionPayPostQuote): SetsisHyperliquidSource = truefor perps withdrawals, skipsrefundTo(funds go HyperCore → Relay directly, no Safe proxy involved)useTransactionCustomAmount): Sources available balance fromPerpsController.state.accountState.availableBalancefor perps withdrawalsuseInsufficientBalanceAlert): Suppresses the "not enough ETH for gas" alert forperpsWithdrawsince the withdrawal is gaslessperpsWithdrawtoTRANSACTION_TYPES_DISABLE_ALERT_BANNER,HIDE_FOOTER_BY_DEFAULT_TYPES, andGO_BACK_TYPESperpsWithdrawuseTransactionPayMetrics): IncludesperpsWithdrawin pay metrics tracking@metamask/transaction-pay-controllerto^19.0.0which includes the HyperLiquid submission logicCore dependency
Changelog
CHANGELOG entry: Add Perps Withdraw confirmation flow
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/CONF-1115
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Adds new
perpsWithdrawhandling across confirmation UI and Transaction Pay configuration, and bumps@metamask/transaction-pay-controllerto a new major version; regressions could affect withdrawal routing, fee display, or gasless/sponsored alerting.Overview
Enables a dedicated confirmation + payment flow for
perpsWithdrawtransactions, including post-quote configuration that marks withdrawals as Hyperliquid-sourced and skipsrefundTo.Updates confirmation UX/behavior to treat
perpsWithdrawlike other special flows (hide footer/alert banner by default, adjust back navigation), suppresses insufficient-gas alerts for gasless withdrawals, and adds a withdraw-specific transaction-fee tooltip string. Also extends pay metrics (mm_pay_use_case) and custom-amount percentage calculations to use Perps available balance.Separately bumps CI iOS bundle-size threshold (53→54) and updates fixtures/snapshots for new controller state fields; upgrades
@metamask/transaction-pay-controllerto^19.0.0(with associated lockfile churn).Written by Cursor Bugbot for commit f9ec71e. This will update automatically on new commits. Configure here.