feat(perps): add Perps Withdraw confirmation flow and post-quote config#28236
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. |
eb26b02 to
b19772a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
b19772a to
8fdd9cb
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag selection rationale:
Dependent tags per descriptions:
Not selected:
Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|




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 trackingCore 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 post-quote configuration; mistakes could misroute withdrawals or misconfigure bridge/refund behavior. Changes are scoped to the confirmations/pay flow and include tests and copy updates.Overview
Enables the confirmations flow to properly support Perps withdrawals (
TransactionType.perpsWithdraw) across UI behavior, fee display, and Transaction Pay configuration.Perps withdrawals are now treated as gasless/Hyperliquid-sourced in
useTransactionPayPostQuote(setsisPostQuoteandisHyperliquidSource, and skipsrefundTo), suppress the insufficient native-balance alert, and usePerpsController.state.accountState.availableBalancefor custom-amount percentage calculations.Confirmation presentation is adjusted for
perpsWithdraw(hide alert banner/footer by default and include it in go-back handling), and the transaction-fee tooltip/copy is extended with a newperps_withdrawlocalized message; related unit tests were updated/added.Written by Cursor Bugbot for commit 8fdd9cb. This will update automatically on new commits. Configure here.