Skip to content

refactor(unstake): use HeaderStandard instead of getStakingNavbar#30281

Draft
weitingsun wants to merge 2 commits into
mainfrom
wsun/changing-unstake-screen-to-use-headerstandard
Draft

refactor(unstake): use HeaderStandard instead of getStakingNavbar#30281
weitingsun wants to merge 2 commits into
mainfrom
wsun/changing-unstake-screen-to-use-headerstandard

Conversation

@weitingsun
Copy link
Copy Markdown
Contributor

@weitingsun weitingsun commented May 15, 2026

Description

Changing unstake screen from using getStakingNavBar to HeaderStandard component. There should be no functional or logic changes

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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.

@github-actions
Copy link
Copy Markdown
Contributor

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.

@metamaskbotv2 metamaskbotv2 Bot added the team-mobile-platform Mobile Platform team label May 15, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.71429% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.95%. Comparing base (6375f80) to head (c34ecbf).
⚠️ Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
...ws/EarnWithdrawInputView/EarnWithdrawInputView.tsx 65.71% 3 Missing and 9 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #30281      +/-   ##
==========================================
+ Coverage   81.92%   81.95%   +0.02%     
==========================================
  Files        5442     5446       +4     
  Lines      145329   145468     +139     
  Branches    33217    33232      +15     
==========================================
+ Hits       119064   119221     +157     
+ Misses      18135    18113      -22     
- Partials     8130     8134       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeStake, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are focused on the EarnWithdrawInputView component (unstake/withdraw flow):

  1. EarnWithdrawInputView.tsx: Significant UI refactor replacing the old getStakingNavbar navigation header with a new HeaderStandard component from the design system. The component now manages its own header (back/cancel buttons with analytics), and the root container changed from ScreenLayout to Box. This is a meaningful UI change that affects the unstake/lending withdrawal screens.

  2. Stake/routes/index.tsx: Added options={{ headerShown: false }} to the UNSTAKE screen route, which is required because the component now renders its own header internally. This is a critical routing change - if the header is not properly hidden, users would see a double header.

  3. EarnWithdrawInputView.styles.ts: Added headerWithSubtitle style for the new header layout.

  4. EarnWithdrawInputView.test.tsx: Unit test updates to match the new implementation.

Tag Selection:

  • SmokeStake: Directly covers "lending withdrawals" and stake/unstake flows. The changed component is the primary UI for unstaking ETH and withdrawing lending tokens (USDC). E2E tests for this flow need to verify the new header renders correctly, navigation works, and the overall flow completes.
  • SmokeConfirmations: Required as a dependent tag per SmokeStake's description ("When selecting SmokeStake, also select SmokeConfirmations (transaction confirmations are part of the flow)"). The unstake/withdraw flow leads to transaction confirmations.

No other tags are needed - the changes are isolated to the Earn/Stake withdraw input view and don't affect shared navigation infrastructure, browser, accounts, swaps, or other features.

Performance Test Selection:
The changes are UI refactoring of the EarnWithdrawInputView header (replacing getStakingNavbar with HeaderStandard). While there is a UI component change, it's a header replacement in a specific flow screen rather than a list rendering, data loading, or app startup change. The performance test tags available (@PerformanceAccountList, @PerformanceOnboarding, @PerformanceLogin, @PerformanceSwaps, @PerformanceLaunch, @PerformanceAssetLoading, @PerformancePredict, @PerformancePreps) don't cover the stake/unstake flow specifically. No performance tests are warranted for this header UI refactor.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size-M team-mobile-platform Mobile Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants