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. |
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (3 files, +60 -2)
👨🔧 @MetaMask/perps (5 files, +54 -166)
|
Builds ready [a4ae8e6]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs [🚀 Bundle size reduced!]
|
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.
Reviewed by Cursor Bugbot for commit 3daa112. Configure here.
Builds ready [3daa112]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [21b086f]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs [🚀 Bundle size reduced!]
|
21b086f to
d4be831
Compare
|
Builds ready [d4be831]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs [🚀 Bundle size reduced!]
|




Description
The Perps withdraw page was using
PerpsWalletAccountHeader(the account avatar + name row) as its page header, which was inconsistent with the deposit confirmation flow that already shows a clean back-arrow + centred title header.Previously, a workaround (
FORCE_WALLET_INITIATED_HEADER_TYPES) was added to the confirmations header system to forceWalletInitiatedHeaderforperpsWithdrawtransactions. Because the withdraw flow lives on its own dedicated route (/perps/withdraw) rather than inside the confirmations flow, this approach was fragile and required patching unrelated confirmation infrastructure.This PR:
PerpsWalletAccountHeaderinperps-withdraw-page.tsxwith an inline header that matches the deposit style: back button on the left, "Withdraw" title centred, and a 32 px spacer on the right to keep the title visually centred.FORCE_WALLET_INITIATED_HEADER_TYPESconstant and its associated logic fromheader.tsx, and removes theperpsWithdrawhandling fromwallet-initiated-header.tsx, cleaning up the confirmation header system.PerpsWalletAccountHeadermock, adds tests for the new back button (data-testid="perps-withdraw-back-button") and header title (data-testid="perps-withdraw-header-title").Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes confirmation header selection and back-button behavior for
perpsDeposit, which could impact how users navigate out of a deposit confirmation. Withdraw page header is refactored to a new inline layout, so UI regressions are possible but scope is limited.Overview
Perps deposit confirmations now use the alternate confirmation header path for
TransactionType.perpsDeposit, showing a custom title (perpsDepositFundsTitle), handling back navigation viaonCancel({ navigateBackToPreviousPage: true }), and hidingAdvancedDetailsButton(replaced with a 32px spacer).Perps withdraw page replaces the
PerpsWalletAccountHeaderstrip with an inline header (back arrow, centeredperpsWithdrawFundsTitle, right-side spacer) and adds/updates tests and i18n strings for the new header titles; the removedPerpsWalletAccountHeadercomponent and its tests are deleted.Reviewed by Cursor Bugbot for commit d4be831. Bugbot is set up for automated code reviews on this repo. Configure here.