diff --git a/app/components/UI/Stake/Views/StakeInputView/StakeInputView.tsx b/app/components/UI/Stake/Views/StakeInputView/StakeInputView.tsx index 3178fd8a48cc..f0888b5c5ba2 100644 --- a/app/components/UI/Stake/Views/StakeInputView/StakeInputView.tsx +++ b/app/components/UI/Stake/Views/StakeInputView/StakeInputView.tsx @@ -24,6 +24,7 @@ import { formatEther } from 'ethers/lib/utils'; import { EVENT_PROVIDERS, EVENT_LOCATIONS } from '../../constants/events'; import { StakeInputViewProps } from './StakeInputView.types'; import { getStakeInputViewTitle } from './utils'; +import { isStablecoinLendingFeatureEnabled } from '../../constants'; const StakeInputView = ({ route }: StakeInputViewProps) => { const navigation = useNavigation(); @@ -147,9 +148,13 @@ const StakeInputView = ({ route }: StakeInputViewProps) => { : strings('stake.review'); useEffect(() => { - const { action, token } = route.params; - - const title = getStakeInputViewTitle(action, token.symbol, token.isETH); + const title = isStablecoinLendingFeatureEnabled() + ? getStakeInputViewTitle( + route?.params?.action, + route?.params?.token.symbol, + route?.params?.token.isETH, + ) + : strings('stake.stake_eth'); navigation.setOptions( getStakingNavbar( diff --git a/app/components/UI/Stake/components/EarnTokenList/__snapshots__/EarnTokenList.test.tsx.snap b/app/components/UI/Stake/components/EarnTokenList/__snapshots__/EarnTokenList.test.tsx.snap index 049277665f8c..aa92a9eb7d3b 100644 --- a/app/components/UI/Stake/components/EarnTokenList/__snapshots__/EarnTokenList.test.tsx.snap +++ b/app/components/UI/Stake/components/EarnTokenList/__snapshots__/EarnTokenList.test.tsx.snap @@ -188,6 +188,7 @@ exports[`EarnTokenList render matches screenshot 1`] = ` style={ { "gap": 12, + "height": 552, "paddingHorizontal": 16, } } diff --git a/app/components/UI/Stake/components/StakingBalance/StakingButtons/StakingButtons.test.tsx b/app/components/UI/Stake/components/StakingBalance/StakingButtons/StakingButtons.test.tsx index c7e5e0e91849..13bb2beef9e3 100644 --- a/app/components/UI/Stake/components/StakingBalance/StakingButtons/StakingButtons.test.tsx +++ b/app/components/UI/Stake/components/StakingBalance/StakingButtons/StakingButtons.test.tsx @@ -15,6 +15,8 @@ import { NavigationProp, ParamListBase, } from '@react-navigation/native'; +import { MOCK_ETH_ASSET } from '../../../__mocks__/mockData'; +import { STAKE_INPUT_VIEW_ACTIONS } from '../../../Views/StakeInputView/StakeInputView.types'; jest.mock('@react-navigation/native', () => ({ ...jest.requireActual('@react-navigation/native'), @@ -82,6 +84,7 @@ describe('StakingButtons', () => { style: {}, hasStakedPositions: true, hasEthToUnstake: true, + asset: MOCK_ETH_ASSET, }; const { getByText } = renderWithProvider(, { state: mockInitialState, @@ -98,6 +101,7 @@ describe('StakingButtons', () => { style: {}, hasStakedPositions: true, hasEthToUnstake: true, + asset: MOCK_ETH_ASSET, }; const { getByText } = renderWithProvider(, { state: mockSepoliaNetworkState, @@ -112,6 +116,10 @@ describe('StakingButtons', () => { ).toHaveBeenCalledWith('mainnet'); expect(navigate).toHaveBeenCalledWith('StakeScreens', { screen: Routes.STAKING.STAKE, + params: { + action: STAKE_INPUT_VIEW_ACTIONS.STAKE, + token: MOCK_ETH_ASSET, + }, }); }); @@ -123,6 +131,7 @@ describe('StakingButtons', () => { style: {}, hasStakedPositions: true, hasEthToUnstake: true, + asset: MOCK_ETH_ASSET, }; const { getByText } = renderWithProvider(, { state: mockSepoliaNetworkState,