Skip to content

chore: update Header for Receive flow#24254

Merged
brianacnguyen merged 4 commits intomainfrom
header/receive
Jan 7, 2026
Merged

chore: update Header for Receive flow#24254
brianacnguyen merged 4 commits intomainfrom
header/receive

Conversation

@brianacnguyen
Copy link
Copy Markdown
Contributor

@brianacnguyen brianacnguyen commented Jan 6, 2026

Description

This PR updates the headers in the receive flow to use the newer HeaderCenter component from component-library/components-temp.

What is the reason for the change?
The getAddressListNavbarOptions function in Navbar/index.js was a one-off navbar utility that duplicated functionality already available in the HeaderCenter component.

What is the improvement/solution?

  • Replaced getAddressListNavbarOptions with getHeaderCenterNavbarOptions in AddressList.tsx
  • Replaced BottomSheetHeader with HeaderCenter in ShareAddressQR.tsx
  • Removed the now-unused getAddressListNavbarOptions function and its tests from Navbar/index.js

This consolidates header patterns and reduces code duplication by leveraging the reusable HeaderCenter component.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MDP-655?atlOrigin=eyJpIjoiNzhiOTE5OWVlN2NkNDIxZDhjMzI3MGJlYTQ4OTU2NDkiLCJwIjoiaiJ9

Manual testing steps

Feature: Receive Flow Headers

  Scenario: user views the address list screen
    Given user is logged in and on the wallet home screen
    When user navigates to the receive flow and opens the address list
    Then the header should display with a back button and centered title
    And tapping the back button should navigate back

  Scenario: user views the share address QR sheet
    Given user is logged in and on the wallet home screen
    When user opens the share address QR bottom sheet
    Then the header should display with the account group and network name
    And tapping the back button should close the sheet

Screenshots/Recordings

Before

After

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-01-05.at.16.26.08.mov

Pre-merge author checklist

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.

Note

Modernizes Receive flow headers to use the shared HeaderCenter pattern and removes a bespoke navbar util.

  • AddressList: replaces getAddressListNavbarOptions with getHeaderCenterNavbarOptions, sets header via navigation.setOptions, and ensures back button uses AddressListIds.GO_BACK
  • ShareAddressQR: swaps BottomSheetHeader for HeaderCenter, adds back button testID via ShareAddressQRIds.GO_BACK
  • Navbar: removes getAddressListNavbarOptions and its tests
  • Tests: update AddressList and ShareAddressQR expectations for header and back button testIDs; add GO_BACK selector in ShareAddressQR.selectors.ts

Written by Cursor Bugbot for commit c9a8dae. This will update automatically on new commits. Configure here.

@brianacnguyen brianacnguyen self-assigned this Jan 6, 2026
@brianacnguyen brianacnguyen requested a review from a team as a code owner January 6, 2026 00:30
@brianacnguyen brianacnguyen added No QA Needed Apply this label when your PR does not need any QA effort. team-design-system All issues relating to design system in Mobile no changelog required No changelog entry is required for this change labels Jan 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 6, 2026

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.

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Jan 6, 2026
@github-actions github-actions bot added the size-M label Jan 6, 2026
@brianacnguyen brianacnguyen added skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. and removed INVALID-PR-TEMPLATE PR's body doesn't match template labels Jan 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 6, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeWalletPlatform
  • Risk Level: low
  • AI Confidence: 80%
click to see 🤖 AI reasoning details

The changes are UI refactoring that replaces header components in MultichainAccounts views:

  1. AddressList.tsx: Swapped getAddressListNavbarOptions with getHeaderCenterNavbarOptions - same functionality, different component
  2. ShareAddressQR.tsx: Replaced BottomSheetHeader with HeaderCenter component - same functionality with added testID
  3. Navbar/index.js: Removed the now-unused getAddressListNavbarOptions function
  4. E2E selectors: Added GO_BACK selector for ShareAddressQR

These are low-risk changes because:

  • The functionality is preserved (back navigation, title display)
  • Unit tests have been updated to reflect the new component structure
  • E2E selectors were properly added for testability
  • No business logic changes, just UI component swaps

The affected components are in the MultichainAccounts area which relates to account management. The existing E2E tests in e2e/specs/multichain-accounts/ use RegressionWalletPlatform tag. Selected SmokeAccounts (for account management features) and SmokeWalletPlatform (for core wallet/account functionality) to ensure the account details and address sharing flows work correctly with the new header components.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jan 6, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@brianacnguyen brianacnguyen added this pull request to the merge queue Jan 7, 2026
Merged via the queue into main with commit b4d7a30 Jan 7, 2026
101 of 102 checks passed
@brianacnguyen brianacnguyen deleted the header/receive branch January 7, 2026 16:23
@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2026
@metamaskbot metamaskbot added the release-7.62.0 Issue or pull request that will be included in release 7.62.0 label Jan 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no changelog required No changelog entry is required for this change No QA Needed Apply this label when your PR does not need any QA effort. release-7.62.0 Issue or pull request that will be included in release 7.62.0 size-M skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants