Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Comment thread
cursor[bot] marked this conversation as resolved.
}, [navigation]);

if (!imageSource) {
Expand Down
2 changes: 2 additions & 0 deletions app/components/UI/Predict/hooks/usePredictDeposit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -155,6 +156,7 @@ describe('usePredictDeposit', () => {
// Assert
expect(mockNavigateToConfirmation).toHaveBeenCalledWith({
loader: ConfirmationLoader.CustomAmount,
stack: Routes.PREDICT.ROOT,
});
});

Expand Down
2 changes: 2 additions & 0 deletions app/components/UI/Predict/hooks/usePredictDeposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -46,6 +47,7 @@ export const usePredictDeposit = () => {
try {
navigateToConfirmation({
loader: ConfirmationLoader.CustomAmount,
stack: Routes.PREDICT.ROOT,
});

depositWithConfirmation({}).catch((err) => {
Expand Down
2 changes: 2 additions & 0 deletions app/components/UI/Predict/hooks/usePredictWithdraw.test.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -206,6 +207,7 @@ describe('usePredictWithdraw', () => {

expect(mockNavigateToConfirmation).toHaveBeenCalledWith({
loader: ConfirmationLoader.CustomAmount,
stack: Routes.PREDICT.ROOT,
});
});

Expand Down
2 changes: 2 additions & 0 deletions app/components/UI/Predict/hooks/usePredictWithdraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from '../../../../component-library/components/Toast';
import { strings } from '../../../../../locales/i18n';
import { selectPredictWithdrawTransaction } from '../selectors/predictController';
import Routes from '../../../../constants/navigation/Routes';

export const usePredictWithdraw = () => {
const { prepareWithdraw } = usePredictTrading();
Expand All @@ -24,6 +25,7 @@ export const usePredictWithdraw = () => {
try {
navigateToConfirmation({
loader: ConfirmationLoader.CustomAmount,
stack: Routes.PREDICT.ROOT,
});

const response = await prepareWithdraw({});
Expand Down
Loading