Skip to content

Commit 76be8a4

Browse files
committed
isnotif isbackground
1 parent 3f4e869 commit 76be8a4

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

test/e2e/tests/smart-transactions/smart-transactions.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ describe('Smart Transactions', function () {
8787
await sendPage.selectTokenFee('USDC');
8888
await driver.delay(1000);
8989
await sendPage.clickConfirmButton();
90+
// await sendPage.clickViewActivity();
9091

9192
const activityList = new ActivityListPage(driver);
9293
await activityList.checkNoFailedTransactions();

ui/pages/routes/confirmation-handler.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ import { getConfirmationRoute } from '../confirmations/hooks/useConfirmationNavi
1313
// eslint-disable-next-line import/no-restricted-paths
1414
import { getEnvironmentType } from '../../../app/scripts/lib/util';
1515
import {
16-
ENVIRONMENT_TYPE_FULLSCREEN,
16+
ENVIRONMENT_TYPE_BACKGROUND,
1717
ENVIRONMENT_TYPE_NOTIFICATION,
18+
// SMART_TRANSACTION_CONFIRMATION_TYPES,
1819
SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES,
1920
} from '../../../shared/constants/app';
2021
import {
@@ -37,6 +38,7 @@ const SNAP_APPROVAL_TYPES = [
3738
SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.showNameSnapAccount,
3839
SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.showSnapAccountRedirect,
3940
///: END:ONLY_INCLUDE_IF
41+
// SMART_TRANSACTION_CONFIRMATION_TYPES.showSmartTransactionStatusPage,
4042
];
4143

4244
export const ConfirmationHandler = () => {
@@ -46,7 +48,7 @@ export const ConfirmationHandler = () => {
4648
const navState = useNavState();
4749

4850
const envType = getEnvironmentType();
49-
const isFullscreen = envType === ENVIRONMENT_TYPE_FULLSCREEN;
51+
const isBackground = envType === ENVIRONMENT_TYPE_BACKGROUND;
5052
const isNotification = envType === ENVIRONMENT_TYPE_NOTIFICATION;
5153

5254
const showAwaitingSwapScreen = useSelector(selectShowAwaitingSwapScreen);
@@ -104,15 +106,14 @@ export const ConfirmationHandler = () => {
104106
return;
105107
}
106108

107-
if (isFullscreen && !hasAllowedPopupRedirectApprovals) {
108-
return;
109+
if (isNotification || isBackground || hasAllowedPopupRedirectApprovals) {
110+
checkStatusAndNavigate();
109111
}
110-
111-
checkStatusAndNavigate();
112112
}, [
113113
checkStatusAndNavigate,
114114
hasAllowedPopupRedirectApprovals,
115-
isFullscreen,
115+
isBackground,
116+
isNotification,
116117
pathname,
117118
]);
118119

0 commit comments

Comments
 (0)