Skip to content
Merged
Changes from all 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
8 changes: 4 additions & 4 deletions ui/pages/routes/confirmation-handler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { getEnvironmentType } from '../../../app/scripts/lib/util';
import {
ENVIRONMENT_TYPE_FULLSCREEN,
ENVIRONMENT_TYPE_NOTIFICATION,
ENVIRONMENT_TYPE_POPUP,
SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES,
} from '../../../shared/constants/app';
import {
Expand Down Expand Up @@ -68,6 +69,7 @@ export const ConfirmationHandler = () => {
const envType = getEnvironmentType();
const isFullscreen = envType === ENVIRONMENT_TYPE_FULLSCREEN;
const isNotification = envType === ENVIRONMENT_TYPE_NOTIFICATION;
const isPopup = envType === ENVIRONMENT_TYPE_POPUP;

const showAwaitingSwapScreen = useSelector(selectShowAwaitingSwapScreen);
const hasSwapsQuotes = useSelector(selectHasSwapsQuotes);
Expand All @@ -84,10 +86,7 @@ export const ConfirmationHandler = () => {
if (canRedirect && showAwaitingSwapScreen) {
closeModals();
navigate(AWAITING_SWAP_ROUTE);
} else if (canRedirect && (hasSwapsQuotes || swapsFetchParams)) {
closeModals();
navigate(PREPARE_SWAP_ROUTE);
} else if (canRedirect && hasBridgeQuotes) {
} else if (canRedirect && hasBridgeQuotes && isPopup) {
closeModals();
navigate(CROSS_CHAIN_SWAP_ROUTE + PREPARE_SWAP_ROUTE);
} else if (pendingApprovals.length || hasApprovalFlows) {
Expand All @@ -113,6 +112,7 @@ export const ConfirmationHandler = () => {
pendingApprovals,
showAwaitingSwapScreen,
swapsFetchParams,
isPopup,
]);

// Runs on all routes (not just home), so skip navigation on exempted routes
Expand Down
Loading