From 0276b38ec35f40044733fbe363c552c8049c71ee Mon Sep 17 00:00:00 2001 From: vinnyhoward Date: Fri, 15 May 2026 12:29:32 -0600 Subject: [PATCH 1/3] fix(predict): pass navigationStack to deposit/withdraw hooks when rendered in HomepageDiscoveryTabs --- .../PredictBalance/PredictBalance.tsx | 6 ++-- .../Predict/hooks/usePredictDeposit.test.ts | 34 +++++++++++++++++++ .../UI/Predict/hooks/usePredictDeposit.ts | 10 +++++- .../Predict/hooks/usePredictWithdraw.test.ts | 28 +++++++++++++++ .../UI/Predict/hooks/usePredictWithdraw.ts | 17 ++++++++-- .../Predict/views/PredictFeed/PredictFeed.tsx | 10 +++++- .../HomepageDiscoveryTabs.tsx | 2 ++ 7 files changed, 101 insertions(+), 6 deletions(-) diff --git a/app/components/UI/Predict/components/PredictBalance/PredictBalance.tsx b/app/components/UI/Predict/components/PredictBalance/PredictBalance.tsx index bbb71ca05d2..26ef4e4128b 100644 --- a/app/components/UI/Predict/components/PredictBalance/PredictBalance.tsx +++ b/app/components/UI/Predict/components/PredictBalance/PredictBalance.tsx @@ -48,11 +48,13 @@ import { PREDICT_BALANCE_TEST_IDS } from './PredictBalance.testIds'; interface PredictBalanceProps { onLayout?: (height: number) => void; onDepositWalletWithdrawPress?: () => void; + navigationStack?: string; } const PredictBalance: React.FC = ({ onLayout, onDepositWalletWithdrawPress, + navigationStack, }) => { const tw = useTailwind(); const privacyMode = useSelector(selectPrivacyMode); @@ -63,8 +65,8 @@ const PredictBalance: React.FC = ({ const queryClient = useQueryClient(); const { data: balance = 0, isLoading } = usePredictBalance(); - const { deposit, isDepositPending } = usePredictDeposit(); - const { withdraw } = usePredictWithdraw(); + const { deposit, isDepositPending } = usePredictDeposit({ navigationStack }); + const { withdraw } = usePredictWithdraw({ navigationStack }); const { executeGuardedAction } = usePredictActionGuard({ navigation, }); diff --git a/app/components/UI/Predict/hooks/usePredictDeposit.test.ts b/app/components/UI/Predict/hooks/usePredictDeposit.test.ts index 7470dcd2cd0..5d0357c35e5 100644 --- a/app/components/UI/Predict/hooks/usePredictDeposit.test.ts +++ b/app/components/UI/Predict/hooks/usePredictDeposit.test.ts @@ -155,9 +155,43 @@ describe('usePredictDeposit', () => { // Assert expect(mockNavigateToConfirmation).toHaveBeenCalledWith({ loader: ConfirmationLoader.CustomAmount, + stack: undefined, }); }); + it('passes navigationStack to navigateToConfirmation when provided', async () => { + // Arrange + const { result } = renderHook(() => + usePredictDeposit({ navigationStack: 'PredictStack' }), + ); + + // Act + await act(async () => { + await result.current.deposit(); + }); + + // Assert + expect(mockNavigateToConfirmation).toHaveBeenCalledWith({ + loader: ConfirmationLoader.CustomAmount, + stack: 'PredictStack', + }); + }); + + it('omits stack from navigateToConfirmation when navigationStack is not provided', async () => { + // Arrange + const { result } = renderHook(() => usePredictDeposit()); + + // Act + await act(async () => { + await result.current.deposit(); + }); + + // Assert + expect(mockNavigateToConfirmation).toHaveBeenCalledWith( + expect.objectContaining({ stack: undefined }), + ); + }); + it('calls depositWithConfirmation when deposit is called', async () => { // Arrange const { result } = renderHook(() => usePredictDeposit()); diff --git a/app/components/UI/Predict/hooks/usePredictDeposit.ts b/app/components/UI/Predict/hooks/usePredictDeposit.ts index 3fa0a6bb91d..81242f458ae 100644 --- a/app/components/UI/Predict/hooks/usePredictDeposit.ts +++ b/app/components/UI/Predict/hooks/usePredictDeposit.ts @@ -22,7 +22,13 @@ interface PredictDepositAnalyticsParams { analyticsProperties?: PlaceOrderParams['analyticsProperties']; } -export const usePredictDeposit = () => { +interface UsePredictDepositOptions { + navigationStack?: string; +} + +export const usePredictDeposit = ({ + navigationStack, +}: UsePredictDepositOptions = {}) => { const { navigateToConfirmation } = useConfirmNavigation(); const theme = useAppThemeFromContext(); const { toastRef } = useContext(ToastContext); @@ -46,6 +52,7 @@ export const usePredictDeposit = () => { try { navigateToConfirmation({ loader: ConfirmationLoader.CustomAmount, + stack: navigationStack, }); depositWithConfirmation({}).catch((err) => { @@ -96,6 +103,7 @@ export const usePredictDeposit = () => { } }, [ + navigationStack, depositWithConfirmation, navigateToConfirmation, navigation, diff --git a/app/components/UI/Predict/hooks/usePredictWithdraw.test.ts b/app/components/UI/Predict/hooks/usePredictWithdraw.test.ts index 2a33fa1147a..199092cb7f8 100644 --- a/app/components/UI/Predict/hooks/usePredictWithdraw.test.ts +++ b/app/components/UI/Predict/hooks/usePredictWithdraw.test.ts @@ -206,9 +206,37 @@ describe('usePredictWithdraw', () => { expect(mockNavigateToConfirmation).toHaveBeenCalledWith({ loader: ConfirmationLoader.CustomAmount, + stack: undefined, }); }); + it('passes navigationStack to navigateToConfirmation when provided', async () => { + mockPrepareWithdraw.mockResolvedValue({ success: true }); + + const { result } = renderHook(() => + usePredictWithdraw({ navigationStack: 'PredictStack' }), + ); + + await result.current.withdraw(); + + expect(mockNavigateToConfirmation).toHaveBeenCalledWith({ + loader: ConfirmationLoader.CustomAmount, + stack: 'PredictStack', + }); + }); + + it('omits stack from navigateToConfirmation when navigationStack is not provided', async () => { + mockPrepareWithdraw.mockResolvedValue({ success: true }); + + const { result } = setupUsePredictWithdrawTest(); + + await result.current.withdraw(); + + expect(mockNavigateToConfirmation).toHaveBeenCalledWith( + expect.objectContaining({ stack: undefined }), + ); + }); + it('calls prepareWithdraw with empty options object', async () => { mockPrepareWithdraw.mockResolvedValue({ success: true }); diff --git a/app/components/UI/Predict/hooks/usePredictWithdraw.ts b/app/components/UI/Predict/hooks/usePredictWithdraw.ts index b94230ab5fb..1923a67100a 100644 --- a/app/components/UI/Predict/hooks/usePredictWithdraw.ts +++ b/app/components/UI/Predict/hooks/usePredictWithdraw.ts @@ -12,7 +12,13 @@ import { import { strings } from '../../../../../locales/i18n'; import { selectPredictWithdrawTransaction } from '../selectors/predictController'; -export const usePredictWithdraw = () => { +interface UsePredictWithdrawOptions { + navigationStack?: string; +} + +export const usePredictWithdraw = ({ + navigationStack, +}: UsePredictWithdrawOptions = {}) => { const { prepareWithdraw } = usePredictTrading(); const { navigateToConfirmation } = useConfirmNavigation(); const navigation = useNavigation(); @@ -24,6 +30,7 @@ export const usePredictWithdraw = () => { try { navigateToConfirmation({ loader: ConfirmationLoader.CustomAmount, + stack: navigationStack, }); const response = await prepareWithdraw({}); @@ -51,7 +58,13 @@ export const usePredictWithdraw = () => { console.error('Failed to proceed with withdraw:', err); } - }, [navigateToConfirmation, navigation, prepareWithdraw, toastRef]); + }, [ + navigationStack, + navigateToConfirmation, + navigation, + prepareWithdraw, + toastRef, + ]); return { withdraw, withdrawTransaction }; }; diff --git a/app/components/UI/Predict/views/PredictFeed/PredictFeed.tsx b/app/components/UI/Predict/views/PredictFeed/PredictFeed.tsx index 34e620b2350..7bb805bdffd 100644 --- a/app/components/UI/Predict/views/PredictFeed/PredictFeed.tsx +++ b/app/components/UI/Predict/views/PredictFeed/PredictFeed.tsx @@ -101,10 +101,12 @@ const AnimatedFlashList = Animated.createAnimatedComponent( const PredictFeedHeader: React.FC<{ onDepositWalletWithdrawPress?: () => void; -}> = ({ onDepositWalletWithdrawPress }) => ( + navigationStack?: string; +}> = ({ onDepositWalletWithdrawPress, navigationStack }) => ( ); @@ -151,6 +153,7 @@ interface AnimatedHeaderProps { onHeaderLayout: (event: LayoutChangeEvent) => void; onTabBarLayout: (event: LayoutChangeEvent) => void; onDepositWalletWithdrawPress?: () => void; + navigationStack?: string; } const AnimatedHeader: React.FC = ({ @@ -164,6 +167,7 @@ const AnimatedHeader: React.FC = ({ onHeaderLayout, onTabBarLayout, onDepositWalletWithdrawPress, + navigationStack, }) => { const tw = useTailwind(); const { colors } = useTheme(); @@ -203,6 +207,7 @@ const AnimatedHeader: React.FC = ({ > {isFeaturedCarouselEnabled && ( @@ -620,6 +625,7 @@ interface PredictFeedProps { onHeaderHiddenChange?: (hidden: boolean) => void; walletHeaderTranslateY?: SharedValue; walletHeaderHeight?: number; + navigationStack?: string; } const PredictFeed: React.FC = ({ @@ -627,6 +633,7 @@ const PredictFeed: React.FC = ({ onHeaderHiddenChange, walletHeaderTranslateY, walletHeaderHeight, + navigationStack, }) => { const { tabs, activeIndex, setActiveIndex, initialTabKey } = usePredictTabs(); @@ -773,6 +780,7 @@ const PredictFeed: React.FC = ({ onHeaderLayout={onHeaderLayout} onTabBarLayout={onTabBarLayout} onDepositWalletWithdrawPress={handleDepositWalletWithdrawPress} + navigationStack={navigationStack} /> {layoutReady && ( diff --git a/app/components/Views/Homepage/components/HomepageDiscoveryTabs/HomepageDiscoveryTabs.tsx b/app/components/Views/Homepage/components/HomepageDiscoveryTabs/HomepageDiscoveryTabs.tsx index b0fcae924e3..44598d081e8 100644 --- a/app/components/Views/Homepage/components/HomepageDiscoveryTabs/HomepageDiscoveryTabs.tsx +++ b/app/components/Views/Homepage/components/HomepageDiscoveryTabs/HomepageDiscoveryTabs.tsx @@ -31,6 +31,7 @@ import { getStreamManagerInstance, } from '../../../../UI/Perps/providers/PerpsStreamManager'; import { PredictPreviewSheetProvider } from '../../../../UI/Predict/contexts'; +import Routes from '../../../../../constants/navigation/Routes'; import { SectionRefreshHandle } from '../../types'; import { IconName } from '../../../../../component-library/components/Icons/Icon/Icon.types'; import { useStyles } from '../../../../../component-library/hooks'; @@ -391,6 +392,7 @@ const HomepageDiscoveryTabs = forwardRef< walletHeaderTranslateY={walletHeaderTranslateY} walletHeaderHeight={walletHeaderHeight} onHeaderHiddenChange={animateIcons} + navigationStack={Routes.PREDICT.ROOT} /> From 2fa2580ebda0de54b8c842fd217ceb886bb38392 Mon Sep 17 00:00:00 2001 From: vinnyhoward Date: Fri, 15 May 2026 12:57:41 -0600 Subject: [PATCH 2/3] fix: remove prop/args for specific stack. not needed --- .../PredictBalance/PredictBalance.tsx | 6 ++-- .../PredictWorldCupMainFeedBanner.tsx | 4 ++- .../Predict/hooks/usePredictDeposit.test.ts | 36 ++----------------- .../UI/Predict/hooks/usePredictDeposit.ts | 12 ++----- .../Predict/hooks/usePredictWithdraw.test.ts | 30 ++-------------- .../UI/Predict/hooks/usePredictWithdraw.ts | 19 +++------- .../Predict/views/PredictFeed/PredictFeed.tsx | 10 +----- .../HomepageDiscoveryTabs.tsx | 2 -- 8 files changed, 17 insertions(+), 102 deletions(-) diff --git a/app/components/UI/Predict/components/PredictBalance/PredictBalance.tsx b/app/components/UI/Predict/components/PredictBalance/PredictBalance.tsx index 26ef4e4128b..bbb71ca05d2 100644 --- a/app/components/UI/Predict/components/PredictBalance/PredictBalance.tsx +++ b/app/components/UI/Predict/components/PredictBalance/PredictBalance.tsx @@ -48,13 +48,11 @@ import { PREDICT_BALANCE_TEST_IDS } from './PredictBalance.testIds'; interface PredictBalanceProps { onLayout?: (height: number) => void; onDepositWalletWithdrawPress?: () => void; - navigationStack?: string; } const PredictBalance: React.FC = ({ onLayout, onDepositWalletWithdrawPress, - navigationStack, }) => { const tw = useTailwind(); const privacyMode = useSelector(selectPrivacyMode); @@ -65,8 +63,8 @@ const PredictBalance: React.FC = ({ const queryClient = useQueryClient(); const { data: balance = 0, isLoading } = usePredictBalance(); - const { deposit, isDepositPending } = usePredictDeposit({ navigationStack }); - const { withdraw } = usePredictWithdraw({ navigationStack }); + const { deposit, isDepositPending } = usePredictDeposit(); + const { withdraw } = usePredictWithdraw(); const { executeGuardedAction } = usePredictActionGuard({ navigation, }); diff --git a/app/components/UI/Predict/components/PredictWorldCupMainFeedBanner/PredictWorldCupMainFeedBanner.tsx b/app/components/UI/Predict/components/PredictWorldCupMainFeedBanner/PredictWorldCupMainFeedBanner.tsx index ddd390dc28e..b8694c717df 100644 --- a/app/components/UI/Predict/components/PredictWorldCupMainFeedBanner/PredictWorldCupMainFeedBanner.tsx +++ b/app/components/UI/Predict/components/PredictWorldCupMainFeedBanner/PredictWorldCupMainFeedBanner.tsx @@ -76,7 +76,9 @@ const PredictWorldCupMainFeedBanner: React.FC< ); const handlePress = useCallback(() => { - navigation.navigate(Routes.PREDICT.WORLD_CUP); + navigation.navigate(Routes.PREDICT.ROOT, { + screen: Routes.PREDICT.WORLD_CUP, + }); }, [navigation]); if (!imageSource) { diff --git a/app/components/UI/Predict/hooks/usePredictDeposit.test.ts b/app/components/UI/Predict/hooks/usePredictDeposit.test.ts index 5d0357c35e5..1d210741e0c 100644 --- a/app/components/UI/Predict/hooks/usePredictDeposit.test.ts +++ b/app/components/UI/Predict/hooks/usePredictDeposit.test.ts @@ -3,6 +3,7 @@ import { usePredictDeposit } from './usePredictDeposit'; import Engine from '../../../../core/Engine'; import Logger from '../../../../util/Logger'; import { ConfirmationLoader } from '../../../Views/confirmations/components/confirm/confirm-component'; +import Routes from '../../../../constants/navigation/Routes'; const mockGoBack = jest.fn(); const mockNavigateToConfirmation = jest.fn(); @@ -155,43 +156,10 @@ describe('usePredictDeposit', () => { // Assert expect(mockNavigateToConfirmation).toHaveBeenCalledWith({ loader: ConfirmationLoader.CustomAmount, - stack: undefined, + stack: Routes.PREDICT.ROOT, }); }); - it('passes navigationStack to navigateToConfirmation when provided', async () => { - // Arrange - const { result } = renderHook(() => - usePredictDeposit({ navigationStack: 'PredictStack' }), - ); - - // Act - await act(async () => { - await result.current.deposit(); - }); - - // Assert - expect(mockNavigateToConfirmation).toHaveBeenCalledWith({ - loader: ConfirmationLoader.CustomAmount, - stack: 'PredictStack', - }); - }); - - it('omits stack from navigateToConfirmation when navigationStack is not provided', async () => { - // Arrange - const { result } = renderHook(() => usePredictDeposit()); - - // Act - await act(async () => { - await result.current.deposit(); - }); - - // Assert - expect(mockNavigateToConfirmation).toHaveBeenCalledWith( - expect.objectContaining({ stack: undefined }), - ); - }); - it('calls depositWithConfirmation when deposit is called', async () => { // Arrange const { result } = renderHook(() => usePredictDeposit()); diff --git a/app/components/UI/Predict/hooks/usePredictDeposit.ts b/app/components/UI/Predict/hooks/usePredictDeposit.ts index 81242f458ae..d4c07ce836b 100644 --- a/app/components/UI/Predict/hooks/usePredictDeposit.ts +++ b/app/components/UI/Predict/hooks/usePredictDeposit.ts @@ -6,6 +6,7 @@ import Logger from '../../../../util/Logger'; import { useAppThemeFromContext } from '../../../../util/theme'; import { ConfirmationLoader } from '../../../Views/confirmations/components/confirm/confirm-component'; import { useConfirmNavigation } from '../../../Views/confirmations/hooks/useConfirmNavigation'; +import Routes from '../../../../constants/navigation/Routes'; import { PREDICT_CONSTANTS } from '../constants/errors'; import { selectPredictPendingDepositByAddress } from '../selectors/predictController'; import { @@ -22,13 +23,7 @@ interface PredictDepositAnalyticsParams { analyticsProperties?: PlaceOrderParams['analyticsProperties']; } -interface UsePredictDepositOptions { - navigationStack?: string; -} - -export const usePredictDeposit = ({ - navigationStack, -}: UsePredictDepositOptions = {}) => { +export const usePredictDeposit = () => { const { navigateToConfirmation } = useConfirmNavigation(); const theme = useAppThemeFromContext(); const { toastRef } = useContext(ToastContext); @@ -52,7 +47,7 @@ export const usePredictDeposit = ({ try { navigateToConfirmation({ loader: ConfirmationLoader.CustomAmount, - stack: navigationStack, + stack: Routes.PREDICT.ROOT, }); depositWithConfirmation({}).catch((err) => { @@ -103,7 +98,6 @@ export const usePredictDeposit = ({ } }, [ - navigationStack, depositWithConfirmation, navigateToConfirmation, navigation, diff --git a/app/components/UI/Predict/hooks/usePredictWithdraw.test.ts b/app/components/UI/Predict/hooks/usePredictWithdraw.test.ts index 199092cb7f8..2cb39284c88 100644 --- a/app/components/UI/Predict/hooks/usePredictWithdraw.test.ts +++ b/app/components/UI/Predict/hooks/usePredictWithdraw.test.ts @@ -1,6 +1,7 @@ import { renderHook } from '@testing-library/react-native'; import { usePredictWithdraw } from './usePredictWithdraw'; import { ConfirmationLoader } from '../../../Views/confirmations/components/confirm/confirm-component'; +import Routes from '../../../../constants/navigation/Routes'; import { POLYMARKET_PROVIDER_ID } from '../providers/polymarket/constants'; // Create mock functions @@ -206,37 +207,10 @@ describe('usePredictWithdraw', () => { expect(mockNavigateToConfirmation).toHaveBeenCalledWith({ loader: ConfirmationLoader.CustomAmount, - stack: undefined, + stack: Routes.PREDICT.ROOT, }); }); - it('passes navigationStack to navigateToConfirmation when provided', async () => { - mockPrepareWithdraw.mockResolvedValue({ success: true }); - - const { result } = renderHook(() => - usePredictWithdraw({ navigationStack: 'PredictStack' }), - ); - - await result.current.withdraw(); - - expect(mockNavigateToConfirmation).toHaveBeenCalledWith({ - loader: ConfirmationLoader.CustomAmount, - stack: 'PredictStack', - }); - }); - - it('omits stack from navigateToConfirmation when navigationStack is not provided', async () => { - mockPrepareWithdraw.mockResolvedValue({ success: true }); - - const { result } = setupUsePredictWithdrawTest(); - - await result.current.withdraw(); - - expect(mockNavigateToConfirmation).toHaveBeenCalledWith( - expect.objectContaining({ stack: undefined }), - ); - }); - it('calls prepareWithdraw with empty options object', async () => { mockPrepareWithdraw.mockResolvedValue({ success: true }); diff --git a/app/components/UI/Predict/hooks/usePredictWithdraw.ts b/app/components/UI/Predict/hooks/usePredictWithdraw.ts index 1923a67100a..0e161ce92db 100644 --- a/app/components/UI/Predict/hooks/usePredictWithdraw.ts +++ b/app/components/UI/Predict/hooks/usePredictWithdraw.ts @@ -11,14 +11,9 @@ import { } from '../../../../component-library/components/Toast'; import { strings } from '../../../../../locales/i18n'; import { selectPredictWithdrawTransaction } from '../selectors/predictController'; +import Routes from '../../../../constants/navigation/Routes'; -interface UsePredictWithdrawOptions { - navigationStack?: string; -} - -export const usePredictWithdraw = ({ - navigationStack, -}: UsePredictWithdrawOptions = {}) => { +export const usePredictWithdraw = () => { const { prepareWithdraw } = usePredictTrading(); const { navigateToConfirmation } = useConfirmNavigation(); const navigation = useNavigation(); @@ -30,7 +25,7 @@ export const usePredictWithdraw = ({ try { navigateToConfirmation({ loader: ConfirmationLoader.CustomAmount, - stack: navigationStack, + stack: Routes.PREDICT.ROOT, }); const response = await prepareWithdraw({}); @@ -58,13 +53,7 @@ export const usePredictWithdraw = ({ console.error('Failed to proceed with withdraw:', err); } - }, [ - navigationStack, - navigateToConfirmation, - navigation, - prepareWithdraw, - toastRef, - ]); + }, [navigateToConfirmation, navigation, prepareWithdraw, toastRef]); return { withdraw, withdrawTransaction }; }; diff --git a/app/components/UI/Predict/views/PredictFeed/PredictFeed.tsx b/app/components/UI/Predict/views/PredictFeed/PredictFeed.tsx index 7bb805bdffd..34e620b2350 100644 --- a/app/components/UI/Predict/views/PredictFeed/PredictFeed.tsx +++ b/app/components/UI/Predict/views/PredictFeed/PredictFeed.tsx @@ -101,12 +101,10 @@ const AnimatedFlashList = Animated.createAnimatedComponent( const PredictFeedHeader: React.FC<{ onDepositWalletWithdrawPress?: () => void; - navigationStack?: string; -}> = ({ onDepositWalletWithdrawPress, navigationStack }) => ( +}> = ({ onDepositWalletWithdrawPress }) => ( ); @@ -153,7 +151,6 @@ interface AnimatedHeaderProps { onHeaderLayout: (event: LayoutChangeEvent) => void; onTabBarLayout: (event: LayoutChangeEvent) => void; onDepositWalletWithdrawPress?: () => void; - navigationStack?: string; } const AnimatedHeader: React.FC = ({ @@ -167,7 +164,6 @@ const AnimatedHeader: React.FC = ({ onHeaderLayout, onTabBarLayout, onDepositWalletWithdrawPress, - navigationStack, }) => { const tw = useTailwind(); const { colors } = useTheme(); @@ -207,7 +203,6 @@ const AnimatedHeader: React.FC = ({ > {isFeaturedCarouselEnabled && ( @@ -625,7 +620,6 @@ interface PredictFeedProps { onHeaderHiddenChange?: (hidden: boolean) => void; walletHeaderTranslateY?: SharedValue; walletHeaderHeight?: number; - navigationStack?: string; } const PredictFeed: React.FC = ({ @@ -633,7 +627,6 @@ const PredictFeed: React.FC = ({ onHeaderHiddenChange, walletHeaderTranslateY, walletHeaderHeight, - navigationStack, }) => { const { tabs, activeIndex, setActiveIndex, initialTabKey } = usePredictTabs(); @@ -780,7 +773,6 @@ const PredictFeed: React.FC = ({ onHeaderLayout={onHeaderLayout} onTabBarLayout={onTabBarLayout} onDepositWalletWithdrawPress={handleDepositWalletWithdrawPress} - navigationStack={navigationStack} /> {layoutReady && ( diff --git a/app/components/Views/Homepage/components/HomepageDiscoveryTabs/HomepageDiscoveryTabs.tsx b/app/components/Views/Homepage/components/HomepageDiscoveryTabs/HomepageDiscoveryTabs.tsx index 44598d081e8..b0fcae924e3 100644 --- a/app/components/Views/Homepage/components/HomepageDiscoveryTabs/HomepageDiscoveryTabs.tsx +++ b/app/components/Views/Homepage/components/HomepageDiscoveryTabs/HomepageDiscoveryTabs.tsx @@ -31,7 +31,6 @@ import { getStreamManagerInstance, } from '../../../../UI/Perps/providers/PerpsStreamManager'; import { PredictPreviewSheetProvider } from '../../../../UI/Predict/contexts'; -import Routes from '../../../../../constants/navigation/Routes'; import { SectionRefreshHandle } from '../../types'; import { IconName } from '../../../../../component-library/components/Icons/Icon/Icon.types'; import { useStyles } from '../../../../../component-library/hooks'; @@ -392,7 +391,6 @@ const HomepageDiscoveryTabs = forwardRef< walletHeaderTranslateY={walletHeaderTranslateY} walletHeaderHeight={walletHeaderHeight} onHeaderHiddenChange={animateIcons} - navigationStack={Routes.PREDICT.ROOT} /> From c5102bef937d915ff2ed82d509342b9417a07ba4 Mon Sep 17 00:00:00 2001 From: vinnyhoward Date: Fri, 15 May 2026 15:33:23 -0600 Subject: [PATCH 3/3] fix: update test --- .../PredictWorldCupMainFeedBanner.test.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/UI/Predict/components/PredictWorldCupMainFeedBanner/PredictWorldCupMainFeedBanner.test.tsx b/app/components/UI/Predict/components/PredictWorldCupMainFeedBanner/PredictWorldCupMainFeedBanner.test.tsx index ed060bcf67a..1dad25a45cf 100644 --- a/app/components/UI/Predict/components/PredictWorldCupMainFeedBanner/PredictWorldCupMainFeedBanner.test.tsx +++ b/app/components/UI/Predict/components/PredictWorldCupMainFeedBanner/PredictWorldCupMainFeedBanner.test.tsx @@ -117,7 +117,9 @@ describe('PredictWorldCupMainFeedBanner', () => { getByTestId(PredictWorldCupMainFeedBannerSelectorsIDs.CONTAINER), ); - expect(mockNavigate).toHaveBeenCalledWith(Routes.PREDICT.WORLD_CUP); + expect(mockNavigate).toHaveBeenCalledWith(Routes.PREDICT.ROOT, { + screen: Routes.PREDICT.WORLD_CUP, + }); }); });