Skip to content

Commit 8b4cc93

Browse files
authored
refactor(earn): migrate Earn routes to native stack and HeaderStandard (MetaMask#30478)
## **Description** Migrates Earn navigation stacks from @react-navigation/stack to @react-navigation/native-stack, and replaces imperative getStakingNavbar headers on stablecoin lending deposit/withdrawal confirmation screens with declarative HeaderStandard from the design system. **Why** - Align Earn with other recently converted stacks (native stack for performance and consistency). - Remove legacy navigation.setOptions(getStakingNavbar(...)) in favor of in-view HeaderStandard, matching patterns from refactor/unstake (MetaMask#30281) and refactor/headerstandard-titles-bridge (accessibility-label–based header interactions in tests). **What changed** _app/components/UI/Earn/routes/index.tsx_ - createStackNavigator → createNativeStackNavigator for EarnScreenStack and EarnModalStack. - EarnScreenStack uses transparentModalScreenOptions. - EarnModalStack uses clearNativeStackNavigatorOptions + transparentModalScreenOptions. - headerShown: false on lending deposit and withdrawal confirmation screens (headers owned by the view). _EarnLendingDepositConfirmationView_ - Renders <HeaderStandard> with dynamic title (Supply <token>). - Back via onBack + backButtonProps.accessibilityLabel: strings('navigation.back'). - Removed dead getStakingNavbar(...) call and navbar useEffect. _EarnLendingWithdrawalConfirmationView_ - Same HeaderStandard pattern with title (Withdraw <token>). - Back press preserves EARN_LENDING_WITHDRAW_CONFIRMATION_BACK_CLICKED analytics (moved from getStakingNavbar backButtonEvent into handleHeaderBackPress). _Tests_ - Added HeaderStandard coverage (title rendering, back navigation, withdrawal back analytics). - Back button queried via getByLabelText(strings('navigation.back')) (bridge header pattern), not button-icon testID. - Removed getStakingNavbar spy/import from withdrawal tests. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin 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** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <img width="334" height="696" alt="Earn - Deposit" src="https://github.com/user-attachments/assets/b9a6838f-3952-4bdf-a30a-720f2dc1921b" /> <img width="346" height="738" alt="Earn - Withdraw" src="https://github.com/user-attachments/assets/6d61116e-a342-414a-86eb-94fed9a1f266" /> <img width="334" height="696" alt="earn - confirmation" src="https://github.com/user-attachments/assets/7074bc4a-f815-4f0a-b652-6a1b6f3afe8f" /> <img width="334" height="696" alt="Earn - conversion education" src="https://github.com/user-attachments/assets/1e687c54-8b3a-4e93-841c-6d7923d09faf" /> <img width="334" height="696" alt="earn - learn more modal" src="https://github.com/user-attachments/assets/ca5195fe-108f-4fcf-8f93-7d3bc54aa328" /> <img width="334" height="696" alt="earn - confirm modal" src="https://github.com/user-attachments/assets/41c191ae-6b4a-409f-b838-5297bcaf2ec3" /> Android _EarnLendingDepositConfirmationView_ and _EarnLendingWithdrawalConfirmationView_ screens after nav header changes |EarnLendingDepositConfirmationView|EarnLendingWithdrawalConfirmationView| | --- | --- | |<img width="1080" height="2316" alt="Screenshot_20260521_071052_MetaMask" src="https://github.com/user-attachments/assets/635fa65b-28a1-4d34-ab8e-8ab0781afaa6" />|<img width="1080" height="2316" alt="Screenshot_20260521_070956_MetaMask" src="https://github.com/user-attachments/assets/408d6e88-980a-4e98-ae6e-098bdb82b3ae" />| ## **Pre-merge author checklist** <!-- Every checklist item must be consciously assessed before marking this PR as "Ready for review". A checked box means you deliberately considered that responsibility, not that you literally performed every action listed. Unchecked boxes are ambiguous: they are not an implicit "N/A" and they are not a silent "skip". See `docs/readme/ready-for-review.md` for the full checklist semantics. --> - [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) - [x] 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](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93) to import wallets with many accounts and tokens - [ ] I've instrumented key operations with Sentry traces for production performance metrics - See [`trace()`](/app/util/trace.ts) for usage and [`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274) for an example For performance guidelines and tooling, see the [Performance Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers). ## **Pre-merge reviewer checklist** <!-- Reviewer checklist items follow the same semantics as the author checklist: an unchecked box is ambiguous, a checked box means the reviewer consciously assessed that responsibility. See `docs/readme/ready-for-review.md`. --> - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches user-facing Earn confirmation navigation and header/back behavior; withdrawal back analytics are explicitly preserved, but stack presentation changes warrant manual regression on deposit/withdraw flows. > > **Overview** > Earn navigation moves from the legacy JS stack to **native stack**, with shared `transparentModalScreenOptions` / `clearNativeStackNavigatorOptions` and **`headerShown: false`** on stablecoin lending deposit and withdrawal confirmation routes so headers live in the screen. > > **Deposit and withdrawal confirmation** drop `getStakingNavbar` / `navigation.setOptions` and render in-view **`HeaderStandard`** with titles built from the routed token (ticker → symbol → name). Back uses `onBack` and the `navigation.back` accessibility label; tests query the back control via that label. > > On **withdrawal**, `EARN_LENDING_WITHDRAW_CONFIRMATION_BACK_CLICKED` analytics move from the old navbar `backButtonEvent` into **`handleHeaderBackPress`** before `goBack()`. Deposit back only navigates back (no new back analytics in this change). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c8a60d9. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 761019c commit 8b4cc93

5 files changed

Lines changed: 164 additions & 95 deletions

File tree

app/components/UI/Earn/Views/EarnLendingDepositConfirmationView/EarnLendingDepositConfirmationView.test.tsx

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { MOCK_ADDRESS_2 } from '../../../../../util/test/accountsControllerTestU
1616
import { backgroundState } from '../../../../../util/test/initial-root-state';
1717
import renderWithProvider from '../../../../../util/test/renderWithProvider';
1818
import { MetaMetricsEvents } from '../../../../../core/Analytics';
19-
import { getStakingNavbar } from '../../../Navbar';
2019
import {
2120
MOCK_AUSDT_MAINNET_ASSET,
2221
MOCK_USDC_MAINNET_ASSET,
@@ -235,8 +234,6 @@ jest.mock('../../../../../util/trace', () => ({
235234
}));
236235

237236
describe('EarnLendingDepositConfirmationView', () => {
238-
jest.mocked(getStakingNavbar);
239-
240237
const mockExecuteLendingDeposit = jest.mocked(
241238
Engine.context.EarnController.executeLendingDeposit,
242239
);
@@ -345,6 +342,56 @@ describe('EarnLendingDepositConfirmationView', () => {
345342
expect(mockGoBack).toHaveBeenCalledTimes(1);
346343
});
347344

345+
describe('HeaderStandard', () => {
346+
it('renders the supply title with the routed token ticker', () => {
347+
const { getByText } = renderWithProvider(
348+
<EarnLendingDepositConfirmationView />,
349+
{ state: mockInitialState },
350+
);
351+
352+
expect(
353+
getByText(
354+
`${strings('earn.supply')} ${MOCK_USDC_MAINNET_ASSET.ticker}`,
355+
),
356+
).toBeOnTheScreen();
357+
});
358+
359+
it('falls back to the token symbol when the routed token has no ticker', () => {
360+
(useRoute as jest.Mock).mockReturnValue({
361+
...defaultRouteParams,
362+
params: {
363+
...defaultRouteParams.params,
364+
token: {
365+
...defaultRouteParams.params.token,
366+
ticker: undefined,
367+
symbol: 'AUSDC',
368+
},
369+
},
370+
});
371+
372+
const { getByText } = renderWithProvider(
373+
<EarnLendingDepositConfirmationView />,
374+
{ state: mockInitialState },
375+
);
376+
377+
expect(getByText(`${strings('earn.supply')} AUSDC`)).toBeOnTheScreen();
378+
});
379+
380+
it('calls navigation.goBack when the back button is pressed', async () => {
381+
const { getByLabelText } = renderWithProvider(
382+
<EarnLendingDepositConfirmationView />,
383+
{ state: mockInitialState },
384+
);
385+
386+
const backButton = getByLabelText(strings('navigation.back'));
387+
await act(async () => {
388+
fireEvent.press(backButton);
389+
});
390+
391+
expect(mockGoBack).toHaveBeenCalledTimes(1);
392+
});
393+
});
394+
348395
describe('USDT token allowance reset edge case', () => {
349396
beforeEach(() => {
350397
jest.clearAllMocks();

app/components/UI/Earn/Views/EarnLendingDepositConfirmationView/index.tsx

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
renderFromTokenMinimalUnit,
2121
} from '../../../../../util/number';
2222
import { useStyles } from '../../../../hooks/useStyles';
23-
import { getStakingNavbar } from '../../../Navbar';
23+
import { HeaderStandard } from '@metamask/design-system-react-native';
2424
import { useAnalytics } from '../../../../hooks/useAnalytics/useAnalytics';
2525
import {
2626
MetaMetricsEvents,
@@ -73,7 +73,7 @@ const Steps = {
7373
};
7474

7575
const EarnLendingDepositConfirmationView = () => {
76-
const { styles, theme } = useStyles(styleSheet, {});
76+
const { styles } = useStyles(styleSheet, {});
7777
const currentCurrency = useSelector(selectCurrentCurrency);
7878
const { params } =
7979
useRoute<EarnLendingDepositConfirmationViewProps['route']>();
@@ -91,7 +91,14 @@ const EarnLendingDepositConfirmationView = () => {
9191
const navigation = useNavigation();
9292
const { trackEvent, createEventBuilder } = useAnalytics();
9393

94-
getStakingNavbar(strings('earn.supply'), navigation, theme.colors);
94+
const headerTitle = useMemo(() => {
95+
const tokenLabel = token?.ticker ?? token?.symbol ?? token?.name ?? '';
96+
return `${strings('earn.supply')} ${tokenLabel}`;
97+
}, [token?.ticker, token?.symbol, token?.name]);
98+
99+
const handleHeaderBackPress = useCallback(() => {
100+
navigation.goBack();
101+
}, [navigation]);
95102

96103
const network = useSelector((state: RootState) =>
97104
selectNetworkConfigurationByChainId(state, token?.chainId as Hex),
@@ -221,18 +228,8 @@ const EarnLendingDepositConfirmationView = () => {
221228
.addProperties(getTrackEventProperties('deposit'))
222229
.build(),
223230
);
224-
225-
const tokenLabel = token?.ticker ?? token?.symbol ?? token?.name ?? '';
226-
const title = `${strings('earn.supply')} ${tokenLabel}`;
227-
228-
navigation.setOptions(
229-
getStakingNavbar(title, navigation, theme.colors, {
230-
hasCancelButton: false,
231-
backgroundColor: theme.colors.background.default,
232-
}),
233-
);
234231
// eslint-disable-next-line react-hooks/exhaustive-deps
235-
}, [navigation, theme.colors]);
232+
}, []);
236233

237234
const emitTxMetaMetric = useCallback(
238235
(txType: TransactionType) =>
@@ -793,6 +790,14 @@ const EarnLendingDepositConfirmationView = () => {
793790

794791
return (
795792
<View style={styles.pageContainer}>
793+
<HeaderStandard
794+
title={headerTitle}
795+
onBack={handleHeaderBackPress}
796+
backButtonProps={{
797+
accessibilityLabel: strings('navigation.back'),
798+
}}
799+
includesTopInset
800+
/>
796801
<ScrollView
797802
style={styles.scrollView}
798803
contentContainerStyle={styles.contentContainer}

app/components/UI/Earn/Views/EarnLendingWithdrawalConfirmationView/EarnLendingWithdrawalConfirmationView.test.tsx

Lines changed: 47 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { LendingMarketWithPosition } from '@metamask/earn-controller';
2-
import { mockTheme } from '../../../../../util/theme';
32
import { useRoute } from '@react-navigation/native';
43
import { act, fireEvent } from '@testing-library/react-native';
54
import React from 'react';
@@ -24,8 +23,6 @@ import {
2423
} from '@metamask/transaction-controller';
2524
import { AnalyticsEventBuilder } from '../../../../../util/analytics/AnalyticsEventBuilder';
2625
import { useAnalytics } from '../../../../hooks/useAnalytics/useAnalytics';
27-
// eslint-disable-next-line import-x/no-namespace
28-
import * as NavbarUtils from '../../../Navbar';
2926
import { MOCK_USDC_MAINNET_ASSET } from '../../../Stake/__mocks__/stakeMockData';
3027
import useEarnToken from '../../hooks/useEarnToken';
3128
import {
@@ -36,8 +33,6 @@ import Routes from '../../../../../constants/navigation/Routes';
3633
import { trace, endTrace, TraceName } from '../../../../../util/trace';
3734
import { RootState } from '../../../../../reducers';
3835

39-
const getStakingNavbarSpy = jest.spyOn(NavbarUtils, 'getStakingNavbar');
40-
4136
const mockGoBack = jest.fn();
4237
const mockNavigate = jest.fn();
4338

@@ -213,45 +208,65 @@ describe('EarnLendingWithdrawalConfirmationView', () => {
213208
} as unknown as ReturnType<typeof useAnalytics>);
214209
});
215210

216-
it('renders withdrawal confirmation with correct navbar title and cancel button', () => {
211+
it('renders the withdrawal confirmation footer cancel button', () => {
217212
const { getByTestId } = renderWithProvider(
218213
<EarnLendingWithdrawalConfirmationView />,
219214
{
220215
state: mockInitialState,
221216
},
222217
);
223218

224-
// Assert Navbar was updated
225-
expect(getStakingNavbarSpy).toHaveBeenCalledWith(
226-
`${strings('earn.withdraw')} ${mockLineaAUsdc.symbol}`,
227-
expect.any(Object), // navigation object
228-
expect.any(Object), // theme.colors
229-
{
230-
hasCancelButton: false,
231-
backgroundColor: mockTheme.colors.background.default,
232-
},
233-
{
234-
backButtonEvent: {
235-
event: {
236-
category: 'Earn Lending Withdraw Confirmation Back Clicked',
237-
},
238-
properties: {
239-
experience: 'STABLECOIN_LENDING',
240-
location: 'EarnLendingWithdrawConfirmationView',
241-
selected_provider: 'consensys',
242-
token: 'AUSDC',
243-
transaction_value: '1 AUSDC',
244-
user_token_balance: '3.62106 AUSDC',
245-
},
246-
},
247-
},
248-
);
249-
250219
expect(
251220
getByTestId(CONFIRMATION_FOOTER_BUTTON_TEST_IDS.CANCEL_BUTTON),
252221
).toBeOnTheScreen();
253222
});
254223

224+
describe('HeaderStandard', () => {
225+
it('renders the withdraw title with the routed token symbol', () => {
226+
const { getByText } = renderWithProvider(
227+
<EarnLendingWithdrawalConfirmationView />,
228+
{
229+
state: mockInitialState,
230+
},
231+
);
232+
233+
expect(
234+
getByText(`${strings('earn.withdraw')} ${mockLineaAUsdc.symbol}`),
235+
).toBeOnTheScreen();
236+
});
237+
238+
it('emits EARN_LENDING_WITHDRAW_CONFIRMATION_BACK_CLICKED and navigates back when the back button is pressed', async () => {
239+
const { getByLabelText } = renderWithProvider(
240+
<EarnLendingWithdrawalConfirmationView />,
241+
{
242+
state: mockInitialState,
243+
},
244+
);
245+
246+
mockTrackEvent.mockClear();
247+
248+
const backButton = getByLabelText(strings('navigation.back'));
249+
await act(async () => {
250+
fireEvent.press(backButton);
251+
});
252+
253+
expect(mockTrackEvent).toHaveBeenCalledWith(
254+
expect.objectContaining({
255+
name: 'Earn Lending Withdraw Confirmation Back Clicked',
256+
properties: expect.objectContaining({
257+
selected_provider: 'consensys',
258+
location: 'EarnLendingWithdrawConfirmationView',
259+
experience: 'STABLECOIN_LENDING',
260+
user_token_balance: '3.62106 AUSDC',
261+
transaction_value: '1 AUSDC',
262+
token: 'AUSDC',
263+
}),
264+
}),
265+
);
266+
expect(mockGoBack).toHaveBeenCalledTimes(1);
267+
});
268+
});
269+
255270
// TODO: https://consensyssoftware.atlassian.net/browse/STAKE-1044 Add back in v1.1
256271
it.skip('displays advanced details section when user has detected borrow positions', () => {
257272
(useRoute as jest.MockedFunction<typeof useRoute>).mockReturnValue({

app/components/UI/Earn/Views/EarnLendingWithdrawalConfirmationView/index.tsx

Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ import { Hex } from '@metamask/utils';
77
import { RouteProp, useNavigation, useRoute } from '@react-navigation/native';
88
import { ethers } from 'ethers';
99
import { capitalize } from 'lodash';
10-
import React, { useCallback, useEffect, useState } from 'react';
10+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
1111
import { View } from 'react-native';
1212
import { useSelector } from 'react-redux';
13+
import { HeaderStandard } from '@metamask/design-system-react-native';
1314
import { strings } from '../../../../../../locales/i18n';
1415
import KeyValueRow, {
1516
TooltipSizes,
@@ -34,7 +35,6 @@ import { useAnalytics } from '../../../../hooks/useAnalytics/useAnalytics';
3435
import { useStyles } from '../../../../hooks/useStyles';
3536
import InfoRowDivider from '../../../../Views/confirmations/components/UI/info-row-divider';
3637
import InfoSection from '../../../../Views/confirmations/components/UI/info-row/info-section';
37-
import { getStakingNavbar } from '../../../Navbar';
3838
import AccountTag from '../../../Stake/components/StakingConfirmation/AccountTag/AccountTag';
3939
import ContractTag from '../../../Stake/components/StakingConfirmation/ContractTag/ContractTag';
4040
import { TokenI } from '../../../Tokens/types';
@@ -72,7 +72,7 @@ export interface EarnWithdrawalConfirmationViewProps {
7272
}
7373

7474
const EarnLendingWithdrawalConfirmationView = () => {
75-
const { styles, theme } = useStyles(styleSheet, {});
75+
const { styles } = useStyles(styleSheet, {});
7676
const { trackEvent, createEventBuilder } = useAnalytics();
7777

7878
const navigation = useNavigation();
@@ -88,6 +88,11 @@ const EarnLendingWithdrawalConfirmationView = () => {
8888
// healthFactorSimulation,
8989
} = params;
9090

91+
const headerTitle = useMemo(() => {
92+
const tokenLabel = token?.ticker ?? token?.symbol ?? token?.name ?? '';
93+
return `${strings('earn.withdraw')} ${tokenLabel}`;
94+
}, [token?.ticker, token?.symbol, token?.name]);
95+
9196
const [isConfirmButtonDisabled, setIsConfirmButtonDisabled] = useState(false);
9297

9398
const { earnTokenPair, getTokenSnapshot, tokenSnapshot } =
@@ -106,50 +111,34 @@ const EarnLendingWithdrawalConfirmationView = () => {
106111

107112
useEndTraceOnMount(TraceName.EarnWithdrawReviewScreen);
108113

109-
useEffect(() => {
110-
const tokenLabel = token?.ticker ?? token?.symbol ?? token?.name ?? '';
111-
const title = `${strings('earn.withdraw')} ${tokenLabel}`;
112-
113-
navigation.setOptions(
114-
getStakingNavbar(
115-
title,
116-
navigation,
117-
theme.colors,
118-
{
119-
hasCancelButton: false,
120-
backgroundColor: theme.colors.background.default,
121-
},
122-
{
123-
backButtonEvent: {
124-
event:
125-
MetaMetricsEvents.EARN_LENDING_WITHDRAW_CONFIRMATION_BACK_CLICKED,
126-
properties: {
127-
selected_provider: EVENT_PROVIDERS.CONSENSYS,
128-
location: EVENT_LOCATIONS.EARN_LENDING_WITHDRAW_CONFIRMATION_VIEW,
129-
experience: EARN_EXPERIENCES.STABLECOIN_LENDING,
130-
user_token_balance: outputToken?.balanceFormatted as string,
131-
transaction_value: `${renderFromTokenMinimalUnit(
132-
amountTokenMinimalUnit,
133-
outputToken?.decimals as number,
134-
)} ${outputToken?.symbol}`,
135-
token: token.symbol,
136-
},
137-
},
138-
},
139-
),
114+
const handleHeaderBackPress = useCallback(() => {
115+
trackEvent(
116+
createEventBuilder(
117+
MetaMetricsEvents.EARN_LENDING_WITHDRAW_CONFIRMATION_BACK_CLICKED,
118+
)
119+
.addProperties({
120+
selected_provider: EVENT_PROVIDERS.CONSENSYS,
121+
location: EVENT_LOCATIONS.EARN_LENDING_WITHDRAW_CONFIRMATION_VIEW,
122+
experience: EARN_EXPERIENCES.STABLECOIN_LENDING,
123+
user_token_balance: outputToken?.balanceFormatted as string,
124+
transaction_value: `${renderFromTokenMinimalUnit(
125+
amountTokenMinimalUnit,
126+
outputToken?.decimals as number,
127+
)} ${outputToken?.symbol}`,
128+
token: token.symbol,
129+
})
130+
.build(),
140131
);
132+
navigation.goBack();
141133
}, [
142134
amountTokenMinimalUnit,
135+
createEventBuilder,
143136
navigation,
144137
outputToken?.balanceFormatted,
145-
outputToken?.balanceMinimalUnit,
146138
outputToken?.decimals,
147-
outputToken?.experience.type,
148139
outputToken?.symbol,
149-
theme.colors,
150140
token.symbol,
151-
token.name,
152-
token.ticker,
141+
trackEvent,
153142
]);
154143

155144
// const riskTextColor = useMemo(() => {
@@ -469,6 +458,14 @@ const EarnLendingWithdrawalConfirmationView = () => {
469458

470459
return (
471460
<View style={styles.pageContainer}>
461+
<HeaderStandard
462+
title={headerTitle}
463+
onBack={handleHeaderBackPress}
464+
backButtonProps={{
465+
accessibilityLabel: strings('navigation.back'),
466+
}}
467+
includesTopInset
468+
/>
472469
<View style={styles.contentContainer}>
473470
<Erc20TokenHero
474471
token={token}

0 commit comments

Comments
 (0)