Commit 6806b97
fix: replace ButtonIcon with HeaderCompactStandard in AddWallet (#29349)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## **Description**
The Add Wallet screen was using a custom `Box` with `ButtonIcon` for the
back button, causing the back arrow to be misaligned compared to other
screens that use the proper header components.
This PR replaces the custom header implementation with
`HeaderCompactStandard` from
`app/component-library/components-temp/HeaderCompactStandard`, which
ensures consistent back button positioning across the app.
**Changes:**
- Removed `ButtonIcon` import (no longer needed)
- Replaced the custom `Box` + `ButtonIcon` wrapper (lines 90-97) with
`HeaderCompactStandard`
- Added `includesTopInset` prop for proper SafeAreaView handling
- Preserved the existing `testID` for the back button
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Fixes: MUL-1773
## **Manual testing steps**
```gherkin
Feature: Add Wallet screen header alignment
Scenario: user navigates to Add Wallet screen
Given user is on the main wallet screen
When user taps the account selector
And user taps "Add wallet or hardware wallet"
Then the back arrow should be aligned consistently with other screens (Import Private Key, Select Hardware Wallet)
```
## **Screenshots/Recordings**
### **Before**
The back arrow was misaligned due to custom `Box` + `ButtonIcon`
implementation with different padding.
### **After**
The back arrow is now aligned with other screens using
`HeaderCompactStandard`.
https://github.com/user-attachments/assets/d6217fbc-af7c-4992-bd4f-cb7e7e543bf4
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
#### Performance checks (if applicable)
- [ ] I've tested on Android
- [ ] I've tested with a power user scenario
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_AGENT_PR_BODY_END -->
[Slack
Thread](https://consensys.slack.com/archives/C09AYKX30P3/p1776873882245089?thread_ts=1776873882.245089&cid=C09AYKX30P3)
<div><a
href="https://cursor.com/agents/bc-a4f696ba-51fa-5471-abdf-52c43f6d450e"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/background-agent?bcId=bc-a4f696ba-51fa-5471-abdf-52c43f6d450e"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>1 parent 0da8069 commit 6806b97
2 files changed
Lines changed: 9 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
| 190 | + | |
195 | 191 | | |
196 | 192 | | |
197 | 193 | | |
| |||
0 commit comments