From 1bfc7317f194444d6cb50fc109acab5132a7e68c Mon Sep 17 00:00:00 2001
From: Daniel <80175477+dan437@users.noreply.github.com>
Date: Tue, 19 Nov 2024 14:52:16 +0100
Subject: [PATCH] feat: Enable smart transactions for new users (#12148)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## **Description**
This PR:
- Removes the Smart Transactions Opt In modal
- New users will have STX toggled on by default once we use this change
from @metamask/preferences-controller:
https://github.com/MetaMask/core/pull/4885
## **Related issues**
Fixes:
## **Manual testing steps**
1. After installing the app a user will not see the STX opt in modal
2. In Advanced Settings Smart Transactions will be on. A user can turn
them off if they want
## **Screenshots/Recordings**
Smart Transactions enabled by default in Advanced settings for new
users:
![image](https://github.com/user-attachments/assets/e08f9dc5-5df6-4de6-a3fc-1c3cbc293e4c)
### **Before**
### **After**
## **Pre-merge author checklist**
- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
---
app/components/Nav/App/index.js | 5 -
.../Views/LedgerConnect/Scan.test.tsx | 2 +-
.../__snapshots__/index.test.tsx.snap | 2 +-
.../Settings/AdvancedSettings/index.test.tsx | 8 +-
.../SmartTranactionsOptInModal.tsx | 298 ------------------
.../SmartTransactionsOptInModal.test.tsx | 149 ---------
app/components/Views/Wallet/index.tsx | 35 +-
app/constants/navigation/Routes.ts | 1 -
app/core/Engine.ts | 1 +
.../slices/smartTransactions/index.test.ts | 25 --
.../redux/slices/smartTransactions/index.ts | 34 --
app/reducers/index.ts | 3 -
app/util/onboarding/index.test.ts | 90 ------
app/util/onboarding/index.ts | 47 ---
.../sentry/__snapshots__/utils.test.ts.snap | 3 -
app/util/sentry/utils.test.ts | 6 -
app/util/test/initial-background-state.json | 2 +-
app/util/test/initial-root-state.ts | 2 -
e2e/api-mocking/mock-config/mock-events.js | 2 +-
.../TransactionProtectionModal.js | 23 --
.../SmartTransactionsOptInModal.selectors.js | 4 -
.../TransactionProtectionModal.selectors.js | 6 -
locales/languages/de.json | 14 -
locales/languages/el.json | 14 -
locales/languages/en.json | 14 -
locales/languages/es.json | 14 -
locales/languages/fr.json | 14 -
locales/languages/hi.json | 14 -
locales/languages/id.json | 14 -
locales/languages/ja.json | 14 -
locales/languages/ko.json | 14 -
locales/languages/pt.json | 14 -
locales/languages/ru.json | 14 -
locales/languages/tl.json | 14 -
locales/languages/tr.json | 14 -
locales/languages/vi.json | 14 -
locales/languages/zh.json | 14 -
package.json | 2 +-
...amask+preferences-controller+13.3.0.patch} | 205 +++++-------
.../Modals/TransactionProtectionModal.js | 33 --
wdio/step-definitions/common-steps.js | 11 -
yarn.lock | 12 +-
42 files changed, 90 insertions(+), 1131 deletions(-)
delete mode 100644 app/components/Views/SmartTransactionsOptInModal/SmartTranactionsOptInModal.tsx
delete mode 100644 app/components/Views/SmartTransactionsOptInModal/SmartTransactionsOptInModal.test.tsx
delete mode 100644 app/core/redux/slices/smartTransactions/index.test.ts
delete mode 100644 app/core/redux/slices/smartTransactions/index.ts
delete mode 100644 app/util/onboarding/index.test.ts
delete mode 100644 e2e/pages/Transactions/TransactionProtectionModal.js
delete mode 100644 e2e/selectors/Modals/SmartTransactionsOptInModal.selectors.js
delete mode 100644 e2e/selectors/Transactions/TransactionProtectionModal.selectors.js
rename patches/{@metamask+preferences-controller+13.1.0.patch => @metamask+preferences-controller+13.3.0.patch} (53%)
delete mode 100644 wdio/screen-objects/Modals/TransactionProtectionModal.js
diff --git a/app/components/Nav/App/index.js b/app/components/Nav/App/index.js
index 32ec40e7203..0ad4fa844e6 100644
--- a/app/components/Nav/App/index.js
+++ b/app/components/Nav/App/index.js
@@ -117,7 +117,6 @@ import OnboardingGeneralSettings from '../../Views/OnboardingSuccess/OnboardingG
import OnboardingAssetsSettings from '../../Views/OnboardingSuccess/OnboardingAssetsSettings';
import OnboardingSecuritySettings from '../../Views/OnboardingSuccess/OnboardingSecuritySettings';
import BasicFunctionalityModal from '../../UI/BasicFunctionality/BasicFunctionalityModal/BasicFunctionalityModal';
-import SmartTransactionsOptInModal from '../../Views/SmartTransactionsOptInModal/SmartTranactionsOptInModal';
import ProfileSyncingModal from '../../UI/ProfileSyncing/ProfileSyncingModal/ProfileSyncingModal';
import ResetNotificationsModal from '../../UI/Notification/ResetNotificationsModal';
import NFTAutoDetectionModal from '../../../../app/components/Views/NFTAutoDetectionModal/NFTAutoDetectionModal';
@@ -389,10 +388,6 @@ const RootModalFlow = () => (
name={Routes.MODAL.MODAL_MANDATORY}
component={ModalMandatory}
/>
-
{
const onDeviceSelected = jest.fn();
const navigateMock = {
- navigate: jest.fn().mockImplementation(() => {onDeviceSelected(device2)}),
+ navigate: jest.fn().mockImplementation(() => {onDeviceSelected(device2);}),
} as unknown as NavigationProp;
jest.mocked(useNavigation).mockReturnValue(navigateMock);
diff --git a/app/components/Views/Settings/AdvancedSettings/__snapshots__/index.test.tsx.snap b/app/components/Views/Settings/AdvancedSettings/__snapshots__/index.test.tsx.snap
index 1f1923e0c31..75f86913fe8 100644
--- a/app/components/Views/Settings/AdvancedSettings/__snapshots__/index.test.tsx.snap
+++ b/app/components/Views/Settings/AdvancedSettings/__snapshots__/index.test.tsx.snap
@@ -239,7 +239,7 @@ exports[`AdvancedSettings should render correctly 1`] = `
}
thumbTintColor="#ffffff"
tintColor="#bbc0c566"
- value={false}
+ value={true}
/>
diff --git a/app/components/Views/Settings/AdvancedSettings/index.test.tsx b/app/components/Views/Settings/AdvancedSettings/index.test.tsx
index 0f0bf162990..7c71f46c2b0 100644
--- a/app/components/Views/Settings/AdvancedSettings/index.test.tsx
+++ b/app/components/Views/Settings/AdvancedSettings/index.test.tsx
@@ -73,7 +73,7 @@ describe('AdvancedSettings', () => {
Device.isIos = jest.fn().mockReturnValue(true);
Device.isAndroid = jest.fn().mockReturnValue(false);
- it('should render smart transactions opt in switch off by default', async () => {
+ it('should render smart transactions opt in switch on by default', async () => {
const { findByLabelText } = renderWithProvider(
{
const switchElement = await findByLabelText(
strings('app_settings.smart_transactions_opt_in_heading'),
);
- expect(switchElement.props.value).toBe(false);
+ expect(switchElement.props.value).toBe(true);
});
it('should update smartTransactionsOptInStatus when smart transactions opt in is pressed', async () => {
const { findByLabelText } = renderWithProvider(
@@ -102,9 +102,9 @@ describe('AdvancedSettings', () => {
strings('app_settings.smart_transactions_opt_in_heading'),
);
- fireEvent(switchElement, 'onValueChange', true);
+ fireEvent(switchElement, 'onValueChange', false);
- expect(mockSetSmartTransactionsOptInStatus).toBeCalledWith(true);
+ expect(mockSetSmartTransactionsOptInStatus).toBeCalledWith(false);
});
});
});
diff --git a/app/components/Views/SmartTransactionsOptInModal/SmartTranactionsOptInModal.tsx b/app/components/Views/SmartTransactionsOptInModal/SmartTranactionsOptInModal.tsx
deleted file mode 100644
index 5c78bdb40c9..00000000000
--- a/app/components/Views/SmartTransactionsOptInModal/SmartTranactionsOptInModal.tsx
+++ /dev/null
@@ -1,298 +0,0 @@
-import React, { useRef } from 'react';
-import {
- StyleSheet,
- View,
- ScrollView,
- Linking,
- ImageBackground,
-} from 'react-native';
-import { strings } from '../../../../locales/i18n';
-import Device from '../../../util/device';
-import StorageWrapper from '../../../store/storage-wrapper';
-import { CURRENT_APP_VERSION } from '../../../constants/storage';
-import { useTheme } from '../../../util/theme';
-import Text, {
- TextColor,
- TextVariant,
-} from '../../../component-library/components/Texts/Text';
-import Icon, {
- IconName,
- IconSize,
-} from '../../../component-library/components/Icons/Icon';
-import ReusableModal, { ReusableModalRef } from '../../UI/ReusableModal';
-import { Colors } from '../../../util/theme/models';
-import { SmartTransactionsOptInModalSelectorsIDs } from '../../../../e2e/selectors/Modals/SmartTransactionsOptInModal.selectors';
-import Engine from '../../../core/Engine';
-import Button, {
- ButtonVariants,
-} from '../../../component-library/components/Buttons/Button';
-import AppConstants from '../../../core/AppConstants';
-import backgroundImage from '../../../images/smart-transactions-opt-in-bg.png';
-import { MetaMetricsEvents, useMetrics } from '../../hooks/useMetrics';
-import { useDispatch } from 'react-redux';
-import { updateOptInModalAppVersionSeen } from '../../../core/redux/slices/smartTransactions';
-
-const MODAL_MARGIN = 24;
-const MODAL_PADDING = 24;
-const screenWidth = Device.getDeviceWidth();
-const screenHeight = Device.getDeviceHeight();
-const itemWidth = screenWidth - MODAL_MARGIN * 2;
-const maxItemHeight = screenHeight - 200;
-
-const createStyles = (colors: Colors) =>
- StyleSheet.create({
- scroll: {
- maxHeight: maxItemHeight,
- },
- content: {
- gap: 16,
- paddingHorizontal: MODAL_PADDING,
- },
- buttons: {
- gap: 10,
- justifyContent: 'center',
- },
- button: {
- width: '100%',
- textAlign: 'center',
- },
- secondaryButtonText: {
- color: colors.text.alternative,
- },
- header: {
- alignItems: 'center',
- },
- descriptions: {
- gap: 16,
- },
- screen: { justifyContent: 'center', alignItems: 'center' },
- modal: {
- backgroundColor: colors.background.default,
- borderRadius: 10,
- marginHorizontal: MODAL_MARGIN,
- },
- bodyContainer: {
- width: itemWidth,
- paddingVertical: 16,
- paddingBottom: 16,
- },
- benefits: {
- flexDirection: 'row',
- justifyContent: 'space-between',
- paddingHorizontal: 8,
- },
- benefit: {
- width: '33%',
- gap: 4,
- alignItems: 'center',
- },
- benefitIcon: {
- width: 35,
- height: 35,
- alignItems: 'center',
- justifyContent: 'center',
- borderRadius: 50,
- backgroundColor: colors.primary.muted,
- },
- benefitText: {
- textAlign: 'center',
- },
- backgroundImage: {
- gap: 16,
- height: 140,
- justifyContent: 'center',
- },
- });
-
-interface Props {
- iconName: IconName;
- text: string[];
-}
-const Benefit = ({ iconName, text }: Props) => {
- const { colors } = useTheme();
- const styles = createStyles(colors);
-
- return (
-
-
-
-
- {text.map((t) => (
-
- {t}
-
- ))}
-
-
- );
-};
-
-const SmartTransactionsOptInModal = () => {
- const modalRef = useRef(null);
- const { colors } = useTheme();
- const { trackEvent } = useMetrics();
- const dispatch = useDispatch();
-
- const styles = createStyles(colors);
-
- const hasOptedIn = useRef(null);
-
- const dismissModal = async () => {
- modalRef.current?.dismissModal();
- };
-
- const markOptInModalAsSeen = async () => {
- const version = await StorageWrapper.getItem(CURRENT_APP_VERSION);
- dispatch(updateOptInModalAppVersionSeen(version));
- };
-
- const optIn = async () => {
- Engine.context.PreferencesController.setSmartTransactionsOptInStatus(true);
- trackEvent(MetaMetricsEvents.SMART_TRANSACTION_OPT_IN, {
- stx_opt_in: true,
- location: 'SmartTransactionsOptInModal',
- });
- hasOptedIn.current = true;
- await markOptInModalAsSeen();
- dismissModal();
- };
-
- const optOut = async () => {
- Engine.context.PreferencesController.setSmartTransactionsOptInStatus(false);
- trackEvent(MetaMetricsEvents.SMART_TRANSACTION_OPT_IN, {
- stx_opt_in: false,
- location: 'SmartTransactionsOptInModal',
- });
- hasOptedIn.current = false;
- await markOptInModalAsSeen();
- dismissModal();
- };
-
- const handleDismiss = async () => {
- // Opt out of STX if no prior decision made.
- if (hasOptedIn.current === null) {
- optOut();
- }
- };
-
- const renderHeader = () => (
-
-
- {strings('whats_new.stx.header')}
-
-
- );
-
- const renderBenefits = () => (
-
-
-
-
-
- );
-
- const renderDescriptions = () => (
-
- {strings('whats_new.stx.description_1')}
-
- {strings('whats_new.stx.description_2')}{' '}
- {
- Linking.openURL(AppConstants.URLS.SMART_TXS);
- }}
- >
- {strings('whats_new.stx.learn_more')}
-
-
-
- );
-
- const renderPrimaryButton = () => (
-
- );
-
- const renderSecondaryButton = () => (
-
- );
-
- return (
-
-
-
-
- {renderHeader()}
- {renderBenefits()}
-
-
- {/* Content */}
-
-
- {renderDescriptions()}
-
-
- {renderPrimaryButton()}
- {renderSecondaryButton()}
-
-
-
-
-
-
- );
-};
-
-export default SmartTransactionsOptInModal;
diff --git a/app/components/Views/SmartTransactionsOptInModal/SmartTransactionsOptInModal.test.tsx b/app/components/Views/SmartTransactionsOptInModal/SmartTransactionsOptInModal.test.tsx
deleted file mode 100644
index 02664a58ebf..00000000000
--- a/app/components/Views/SmartTransactionsOptInModal/SmartTransactionsOptInModal.test.tsx
+++ /dev/null
@@ -1,149 +0,0 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
-import React from 'react';
-import { fireEvent } from '@testing-library/react-native';
-import SmartTransactionsOptInModal from './SmartTranactionsOptInModal';
-import renderWithProvider from '../../../util/test/renderWithProvider';
-import { backgroundState } from '../../../util/test/initial-root-state';
-import { strings } from '../../../../locales/i18n';
-import Engine from '../../../core/Engine';
-import { shouldShowWhatsNewModal } from '../../../util/onboarding';
-import { updateOptInModalAppVersionSeen } from '../../../core/redux/slices/smartTransactions';
-
-const mockNavigate = jest.fn();
-jest.mock('@react-navigation/native', () => {
- const actualReactNavigation = jest.requireActual('@react-navigation/native');
- return {
- ...actualReactNavigation,
- useNavigation: () => ({
- navigate: mockNavigate,
- goBack: jest.fn(),
- }),
- };
-});
-
-jest.mock('../../../core/Engine', () => ({
- context: {
- PreferencesController: {
- setSmartTransactionsOptInStatus: jest.fn(),
- },
- },
-}));
-
-const VERSION = '1.0.0';
-jest.mock('../../../store/storage-wrapper', () => ({
- getItem: jest.fn(() => VERSION),
- setItem: jest.fn(),
- removeItem: jest.fn(),
-}));
-
-jest.mock('../../../util/onboarding', () => ({
- shouldShowWhatsNewModal: jest.fn(),
-}));
-
-jest.mock('../../../core/redux/slices/smartTransactions', () => ({
- updateOptInModalAppVersionSeen: jest.fn(() => ({ type: 'hello' })),
-}));
-
-const initialState = {
- engine: {
- backgroundState,
- },
-};
-
-function wait(ms: number) {
- return new Promise((resolve) => setTimeout(resolve, ms));
-}
-
-describe('SmartTransactionsOptInModal', () => {
- afterEach(() => {
- mockNavigate.mockReset();
- });
-
- it('should render properly', () => {
- const { getByText } = renderWithProvider(, {
- state: initialState,
- });
-
- const header = getByText(strings('whats_new.stx.header'));
- expect(header).toBeDefined();
-
- const description1 = getByText(strings('whats_new.stx.description_1'));
- expect(description1).toBeDefined();
-
- const description2 = getByText(strings('whats_new.stx.description_2'), {
- exact: false,
- });
- expect(description2).toBeDefined();
-
- const primaryButton = getByText(strings('whats_new.stx.primary_button'));
- expect(primaryButton).toBeDefined();
-
- const secondaryButton = getByText(strings('whats_new.stx.no_thanks'));
- expect(secondaryButton).toBeDefined();
- });
-
- it('should opt user in when primary button is pressed', () => {
- const { getByText } = renderWithProvider(, {
- state: initialState,
- });
-
- const primaryButton = getByText(strings('whats_new.stx.primary_button'));
- fireEvent.press(primaryButton);
-
- expect(
- Engine.context.PreferencesController.setSmartTransactionsOptInStatus,
- ).toHaveBeenCalledWith(true);
- });
-
- it('opts user out when secondary button is pressed', async () => {
- const { getByText } = renderWithProvider(, {
- state: initialState,
- });
-
- const secondaryButton = getByText(strings('whats_new.stx.no_thanks'));
- fireEvent.press(secondaryButton);
-
- expect(
- Engine.context.PreferencesController.setSmartTransactionsOptInStatus,
- ).toHaveBeenCalledWith(false);
- });
-
- it('should update last app version seen on primary button press', () => {
- const { getByText } = renderWithProvider(, {
- state: initialState,
- });
-
- const primaryButton = getByText(strings('whats_new.stx.primary_button'));
- fireEvent.press(primaryButton);
-
- expect(updateOptInModalAppVersionSeen).toHaveBeenCalledWith(VERSION);
- });
-
- it('should update last app version seen on secondary button press', () => {
- const { getByText } = renderWithProvider(, {
- state: initialState,
- });
-
- const secondaryButton = getByText(strings('whats_new.stx.no_thanks'));
- fireEvent.press(secondaryButton);
-
- expect(updateOptInModalAppVersionSeen).toHaveBeenCalledWith(VERSION);
- });
-
- it("should not navigate to What's New modal", async () => {
- (shouldShowWhatsNewModal as jest.Mock).mockImplementation(
- async () => false,
- );
-
- const { getByText } = renderWithProvider(, {
- state: initialState,
- });
-
- const primaryButton = getByText(strings('whats_new.stx.primary_button'));
- fireEvent.press(primaryButton);
-
- await wait(10);
-
- expect(mockNavigate).not.toHaveBeenCalled();
- });
-});
diff --git a/app/components/Views/Wallet/index.tsx b/app/components/Views/Wallet/index.tsx
index d06231fc9b9..0d7af2c72bc 100644
--- a/app/components/Views/Wallet/index.tsx
+++ b/app/components/Views/Wallet/index.tsx
@@ -4,7 +4,6 @@ import {
StyleSheet,
View,
TextStyle,
- InteractionManager,
Linking,
} from 'react-native';
import type { Theme } from '@metamask/design-tokens';
@@ -36,8 +35,6 @@ import { getTicker } from '../../../util/transactions';
import OnboardingWizard from '../../UI/OnboardingWizard';
import ErrorBoundary from '../ErrorBoundary';
import { useTheme } from '../../../util/theme';
-import { shouldShowSmartTransactionsOptInModal } from '../../../util/onboarding';
-import Logger from '../../../util/Logger';
import Routes from '../../../constants/navigation/Routes';
import {
getDecimalChainId,
@@ -336,7 +333,7 @@ const Wallet = ({
});
/**
- * Check to see if we need to show What's New modal and Smart Transactions Opt In modal
+ * Check to see if we need to show What's New modal
*/
useEffect(() => {
const networkOnboarded = getIsNetworkOnboarded(
@@ -351,36 +348,6 @@ const Wallet = ({
// Do not check since it will conflict with the onboarding wizard and/or network onboarding
return;
}
-
- // Show STX opt in modal before What's New modal
- // Fired on the first load of the wallet and also on network switch
- const checkSmartTransactionsOptInModal = async () => {
- try {
- const accountHasZeroBalance = hexToBN(
- accountBalanceByChainId?.balance || '0x0',
- ).isZero();
- const shouldShowStxOptInModal =
- await shouldShowSmartTransactionsOptInModal(
- providerConfig.chainId,
- providerConfig.rpcUrl,
- accountHasZeroBalance,
- );
- if (shouldShowStxOptInModal) {
- navigation.navigate(Routes.MODAL.ROOT_MODAL_FLOW, {
- screen: Routes.MODAL.SMART_TRANSACTIONS_OPT_IN,
- });
- }
- } catch (error) {
- Logger.log(
- error,
- 'Error while checking Smart Tranasctions Opt In modal!',
- );
- }
- };
-
- InteractionManager.runAfterInteractions(() => {
- checkSmartTransactionsOptInModal();
- });
}, [
wizardStep,
navigation,
diff --git a/app/constants/navigation/Routes.ts b/app/constants/navigation/Routes.ts
index 3b3dfcc7ced..e3eef28d2b7 100644
--- a/app/constants/navigation/Routes.ts
+++ b/app/constants/navigation/Routes.ts
@@ -43,7 +43,6 @@ const Routes = {
MODAL_CONFIRMATION: 'ModalConfirmation',
MODAL_MANDATORY: 'ModalMandatory',
WHATS_NEW: 'WhatsNewModal',
- SMART_TRANSACTIONS_OPT_IN: 'SmartTransactionsOptInModal',
TURN_OFF_REMEMBER_ME: 'TurnOffRememberMeModal',
UPDATE_NEEDED: 'UpdateNeededModal',
ENABLE_AUTOMATIC_SECURITY_CHECKS: 'EnableAutomaticSecurityChecksModal',
diff --git a/app/core/Engine.ts b/app/core/Engine.ts
index 55d6fdbf2e3..67f7dd6bc37 100644
--- a/app/core/Engine.ts
+++ b/app/core/Engine.ts
@@ -551,6 +551,7 @@ export class Engine {
useNftDetection: true, // set this to true to enable nft detection by default to new users
displayNftMedia: true,
securityAlertsEnabled: true,
+ smartTransactionsOptInStatus: true,
tokenSortConfig: {
key: 'tokenFiatAmount',
order: 'dsc',
diff --git a/app/core/redux/slices/smartTransactions/index.test.ts b/app/core/redux/slices/smartTransactions/index.test.ts
deleted file mode 100644
index f97ff4436a6..00000000000
--- a/app/core/redux/slices/smartTransactions/index.test.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import reducer, {
- updateOptInModalAppVersionSeen,
- SmartTransactionsState,
-} from '.';
-
-describe('smartTransactions slice', () => {
- // Define the initial state for your tests
- const initialState: SmartTransactionsState = {
- optInModalAppVersionSeen: null,
- };
-
- it('should handle initial state', () => {
- expect(reducer(undefined, { type: 'unknown' })).toEqual({
- optInModalAppVersionSeen: null,
- });
- });
-
- it('should handle updateOptInModalAppVersionSeen', () => {
- const actual = reducer(
- initialState,
- updateOptInModalAppVersionSeen('2.0.0'),
- );
- expect(actual.optInModalAppVersionSeen).toEqual('2.0.0');
- });
-});
diff --git a/app/core/redux/slices/smartTransactions/index.ts b/app/core/redux/slices/smartTransactions/index.ts
deleted file mode 100644
index f644375d10a..00000000000
--- a/app/core/redux/slices/smartTransactions/index.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { PayloadAction, createSlice } from '@reduxjs/toolkit';
-
-export interface SmartTransactionsState {
- optInModalAppVersionSeen: string | null;
-}
-
-export const initialState: SmartTransactionsState = {
- optInModalAppVersionSeen: null,
-};
-
-const name = 'smartTransactions';
-
-const slice = createSlice({
- name,
- initialState,
- reducers: {
- /**
- * Updates the the app version seen for the opt in modal.
- * @param state - The current state of the smartTransactions slice.
- * @param action - An action with the new app version seen as payload.
- */
- updateOptInModalAppVersionSeen: (state, action: PayloadAction) => {
- state.optInModalAppVersionSeen = action.payload;
- },
- },
-});
-
-const { actions, reducer } = slice;
-
-export default reducer;
-
-// Actions / action-creators
-
-export const { updateOptInModalAppVersionSeen } = actions;
diff --git a/app/reducers/index.ts b/app/reducers/index.ts
index cc8f3b7cd26..39f5f91c8c8 100644
--- a/app/reducers/index.ts
+++ b/app/reducers/index.ts
@@ -29,7 +29,6 @@ import rpcEventReducer from './rpcEvents';
import accountsReducer from './accounts';
import sdkReducer from './sdk';
import inpageProviderReducer from '../core/redux/slices/inpageProvider';
-import smartTransactionsReducer from '../core/redux/slices/smartTransactions';
import transactionMetricsReducer from '../core/redux/slices/transactionMetrics';
import originThrottlingReducer from '../core/redux/slices/originThrottling';
import notificationsAccountsProvider from '../core/redux/slices/notifications';
@@ -80,7 +79,6 @@ export interface RootState {
// TODO: Replace "any" with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
transaction: any;
- smartTransactions: StateFromReducer;
user: IUserReducer;
// TODO: Replace "any" with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -145,7 +143,6 @@ const rootReducer = combineReducers({
settings: settingsReducer,
alert: alertReducer,
transaction: transactionReducer,
- smartTransactions: smartTransactionsReducer,
user: userReducer,
wizard: wizardReducer,
onboarding: onboardingReducer,
diff --git a/app/util/onboarding/index.test.ts b/app/util/onboarding/index.test.ts
deleted file mode 100644
index ed29990daca..00000000000
--- a/app/util/onboarding/index.test.ts
+++ /dev/null
@@ -1,90 +0,0 @@
-import { shouldShowSmartTransactionsOptInModal } from './index';
-import StorageWrapper from '../../store/storage-wrapper';
-import { NETWORKS_CHAIN_ID } from '../../constants/network';
-import { store } from '../../store';
-
-const getMockState = (optInModalAppVersionSeen: string | null) => ({
- smartTransactions: {
- optInModalAppVersionSeen,
- },
-});
-
-jest.mock('../../store/storage-wrapper');
-
-jest.mock('../../store', () => ({
- store: {
- getState: jest.fn(() => getMockState(null)),
- dispatch: jest.fn(),
- },
-}));
-
-describe('shouldShowSmartTransactionOptInModal', () => {
- beforeEach(() => {
- // Clear all instances and calls to constructor and all methods:
- (StorageWrapper.getItem as jest.Mock).mockClear();
- (store.getState as jest.Mock).mockClear();
- });
-
- it('returns true if a user has not seen the modal, is on Ethereum mainnet with default RPC URL and has non-zero balance', async () => {
- (StorageWrapper.getItem as jest.Mock).mockResolvedValueOnce('7.24.0'); // currentAppVersion
- (store.getState as jest.Mock).mockReturnValueOnce(getMockState(null)); // versionSeen
-
- const result = await shouldShowSmartTransactionsOptInModal(
- NETWORKS_CHAIN_ID.MAINNET,
- undefined,
- false,
- );
- expect(result).toBe(true);
- });
-
- test.each([
- [NETWORKS_CHAIN_ID.MAINNET, 'http://mainnet-url.example.com'],
- [NETWORKS_CHAIN_ID.ARBITRUM, 'http://arbitrum-url.example.com'],
- ])(
- `returns false if chainId is not ${NETWORKS_CHAIN_ID.MAINNET} or providerConfigRpcUrl is defined`,
- async (chainId, rpcUrl) => {
- const result = await shouldShowSmartTransactionsOptInModal(
- chainId,
- rpcUrl,
- false,
- );
- expect(result).toBe(false);
- },
- );
-
- it('returns false if user has seen the modal', async () => {
- (StorageWrapper.getItem as jest.Mock).mockResolvedValueOnce('7.24.0'); // currentAppVersion
- (store.getState as jest.Mock).mockReturnValueOnce(getMockState('7.24.0')); // versionSeen
-
- const result = await shouldShowSmartTransactionsOptInModal(
- NETWORKS_CHAIN_ID.MAINNET,
- undefined,
- false,
- );
- expect(result).toBe(false);
- });
-
- it('returns false if app version is not correct', async () => {
- (StorageWrapper.getItem as jest.Mock).mockResolvedValueOnce('7.0.0'); // currentAppVersion
- (store.getState as jest.Mock).mockReturnValueOnce(getMockState(null)); // versionSeen
-
- const result = await shouldShowSmartTransactionsOptInModal(
- NETWORKS_CHAIN_ID.MAINNET,
- undefined,
- false,
- );
- expect(result).toBe(false);
- });
-
- it('returns false if a user has 0 balance on Ethereum Mainnet with default RPC URL', async () => {
- (StorageWrapper.getItem as jest.Mock).mockResolvedValueOnce('7.24.0'); // currentAppVersion
- (store.getState as jest.Mock).mockReturnValueOnce(getMockState(null)); // versionSeen
-
- const result = await shouldShowSmartTransactionsOptInModal(
- NETWORKS_CHAIN_ID.MAINNET,
- undefined,
- true,
- );
- expect(result).toBe(false);
- });
-});
diff --git a/app/util/onboarding/index.ts b/app/util/onboarding/index.ts
index 3afd4ad6a6c..62508c412c8 100644
--- a/app/util/onboarding/index.ts
+++ b/app/util/onboarding/index.ts
@@ -7,59 +7,12 @@ import {
} from '../../constants/storage';
import { whatsNewList } from '../../components/UI/WhatsNewModal';
import StorageWrapper from '../../store/storage-wrapper';
-import { NETWORKS_CHAIN_ID } from '../../constants/network';
-import { store } from '../../store';
const isVersionSeenAndGreaterThanMinAppVersion = (
versionSeen: string | null,
minAppVersion: string,
) => !!versionSeen && compareVersions.compare(versionSeen, minAppVersion, '>=');
-const STX_OPT_IN_MIN_APP_VERSION = '7.24.0';
-
-/**
- *
- * @param chainId The chainId of the current network
- * @param providerConfigRpcUrl The RPC URL of the current network
- * @returns Boolean indicating whether or not to show smart transactions opt in modal
- */
-export const shouldShowSmartTransactionsOptInModal = async (
- chainId: string,
- providerConfigRpcUrl: string | undefined,
- accountHasZeroBalance: boolean,
-) => {
- if (
- process.env.IS_TEST === 'true' ||
- chainId !== NETWORKS_CHAIN_ID.MAINNET ||
- providerConfigRpcUrl !== undefined || // undefined is the default RPC URL (Infura).
- accountHasZeroBalance
- ) {
- return false;
- }
-
- const versionSeen =
- store.getState().smartTransactions.optInModalAppVersionSeen;
-
- const currentAppVersion = await StorageWrapper.getItem(CURRENT_APP_VERSION);
-
- // Check if user has seen
- const seen = isVersionSeenAndGreaterThanMinAppVersion(
- versionSeen,
- STX_OPT_IN_MIN_APP_VERSION,
- );
-
- if (seen) return false;
-
- // Check version
- const versionCorrect = compareVersions.compare(
- currentAppVersion as string,
- STX_OPT_IN_MIN_APP_VERSION,
- '>=',
- );
-
- return versionCorrect;
-};
-
/**
* Returns boolean indicating whether or not to show whats new modal
*
diff --git a/app/util/sentry/__snapshots__/utils.test.ts.snap b/app/util/sentry/__snapshots__/utils.test.ts.snap
index 8b31961472f..5155459d5e2 100644
--- a/app/util/sentry/__snapshots__/utils.test.ts.snap
+++ b/app/util/sentry/__snapshots__/utils.test.ts.snap
@@ -197,9 +197,6 @@ exports[`captureSentryFeedback maskObject masks initial root state fixture 1`] =
"useBlockieIcon": true,
},
"signatureRequest": "object",
- "smartTransactions": {
- "optInModalAppVersionSeen": null,
- },
"swaps": "object",
"transaction": "object",
"transactionMetrics": "object",
diff --git a/app/util/sentry/utils.test.ts b/app/util/sentry/utils.test.ts
index 1c4a0b9c02a..6f690289379 100644
--- a/app/util/sentry/utils.test.ts
+++ b/app/util/sentry/utils.test.ts
@@ -366,9 +366,6 @@ describe('captureSentryFeedback', () => {
type: undefined,
warningGasPriceHigh: undefined,
},
- smartTransactions: {
- optInModalAppVersionSeen: null,
- },
user: {
ambiguousAddressEntries: {},
backUpSeedphraseVisible: false,
@@ -500,7 +497,6 @@ describe('captureSentryFeedback', () => {
security: 'object',
settings: 'object',
signatureRequest: 'object',
- smartTransactions: 'object',
swaps: 'object',
transaction: 'object',
transactionMetrics: 'object',
@@ -540,7 +536,6 @@ describe('captureSentryFeedback', () => {
security: 'object',
settings: 'object',
signatureRequest: 'object',
- smartTransactions: 'object',
swaps: 'object',
transaction: 'object',
transactionMetrics: 'object',
@@ -577,7 +572,6 @@ describe('captureSentryFeedback', () => {
security: 'object',
settings: 'object',
signatureRequest: 'object',
- smartTransactions: 'object',
swaps: 'object',
transaction: 'object',
transactionMetrics: 'object',
diff --git a/app/util/test/initial-background-state.json b/app/util/test/initial-background-state.json
index 5e26fc63afb..1c7492d5c45 100644
--- a/app/util/test/initial-background-state.json
+++ b/app/util/test/initial-background-state.json
@@ -190,7 +190,7 @@
"0x64": true
},
"isIpfsGatewayEnabled": true,
- "smartTransactionsOptInStatus": false,
+ "smartTransactionsOptInStatus": true,
"useTransactionSimulations": true,
"tokenSortConfig": {
"key": "tokenFiatAmount",
diff --git a/app/util/test/initial-root-state.ts b/app/util/test/initial-root-state.ts
index a14f5fec8e6..58be6fea8d8 100644
--- a/app/util/test/initial-root-state.ts
+++ b/app/util/test/initial-root-state.ts
@@ -3,7 +3,6 @@ import type { EngineState } from '../../core/Engine';
import { initialState as initialFiatOrdersState } from '../../reducers/fiatOrders';
import { initialState as initialSecurityState } from '../../reducers/security';
import { initialState as initialInpageProvider } from '../../core/redux/slices/inpageProvider';
-import { initialState as initialSmartTransactions } from '../../core/redux/slices/smartTransactions';
import { initialState as transactionMetrics } from '../../core/redux/slices/transactionMetrics';
import { initialState as originThrottling } from '../../core/redux/slices/originThrottling';
import { initialState as initialFeatureFlagsState } from '../../core/redux/slices/featureFlags';
@@ -27,7 +26,6 @@ const initialRootState: RootState = {
settings: undefined,
alert: undefined,
transaction: undefined,
- smartTransactions: initialSmartTransactions,
user: userInitialState,
wizard: undefined,
onboarding: undefined,
diff --git a/e2e/api-mocking/mock-config/mock-events.js b/e2e/api-mocking/mock-config/mock-events.js
index acfd95a6fdf..0d639812497 100644
--- a/e2e/api-mocking/mock-config/mock-events.js
+++ b/e2e/api-mocking/mock-config/mock-events.js
@@ -22,7 +22,7 @@ export const mockEvents = {
response: suggestedGasApiResponses.error,
responseCode: 500,
},
-
+
/**
* Ganache gas fees endpoint with a mock 200 success response.
* @property {string} urlEndpoint - API endpoint for Ganache gas fees.
diff --git a/e2e/pages/Transactions/TransactionProtectionModal.js b/e2e/pages/Transactions/TransactionProtectionModal.js
deleted file mode 100644
index 250ac4239b8..00000000000
--- a/e2e/pages/Transactions/TransactionProtectionModal.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import { TransactionProtectionModalSelectorText } from '../../selectors/Transactions/TransactionProtectionModal.selectors';
-import Matchers from '../../utils/Matchers';
-import Gestures from '../../utils/Gestures';
-
-class TransactionProtectionModal {
- get header() {
- return Matchers.getElementByText(
- TransactionProtectionModalSelectorText.HEADER,
- );
- }
-
- get enableButton() {
- return Matchers.getElementByText(
- TransactionProtectionModalSelectorText.ENABLE_BUTTON,
- );
- }
-
- async tapEnableButton() {
- await Gestures.waitAndTap(this.enableButton);
- }
-}
-
-export default new TransactionProtectionModal();
diff --git a/e2e/selectors/Modals/SmartTransactionsOptInModal.selectors.js b/e2e/selectors/Modals/SmartTransactionsOptInModal.selectors.js
deleted file mode 100644
index 449c585d83b..00000000000
--- a/e2e/selectors/Modals/SmartTransactionsOptInModal.selectors.js
+++ /dev/null
@@ -1,4 +0,0 @@
-export const SmartTransactionsOptInModalSelectorsIDs = {
- CLOSE_BUTTON: 'smart-transactions-opt-in-modal-close-button',
- CONTAINER: 'smart-transactions-opt-in-modal-container',
-};
diff --git a/e2e/selectors/Transactions/TransactionProtectionModal.selectors.js b/e2e/selectors/Transactions/TransactionProtectionModal.selectors.js
deleted file mode 100644
index 98978e8f6a8..00000000000
--- a/e2e/selectors/Transactions/TransactionProtectionModal.selectors.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import enContent from '../../../locales/languages/en.json';
-
-export const TransactionProtectionModalSelectorText = {
- HEADER: enContent.whats_new.stx.header,
- ENABLE_BUTTON: enContent.whats_new.stx.primary_button,
-};
diff --git a/locales/languages/de.json b/locales/languages/de.json
index dffdebd14f5..7c02a371a66 100644
--- a/locales/languages/de.json
+++ b/locales/languages/de.json
@@ -2940,20 +2940,6 @@
"description": "Verkaufen Sie Ihre Krypto direkt in MetaMask! Wir helfen Ihnen, Kurse von vertrauenswürdigen Anbietern zu finden, damit Sie Ihre Krypto jederzeit zugreifbar, schnell und sicher verkaufen können.",
"action_text": "Probieren Sie es aus"
},
- "stx": {
- "header": "Verbesserter Transaktionsschutz",
- "description_1": "Erzielen Sie mit Smart Transactions höhere Erfolgsraten, einen Frontrunning-Schutz und eine bessere Transparenz.",
- "description_2": "Nur auf Ethereum verfügbar. Sie können diese Funktion jederzeit in den Einstellungen aktivieren oder deaktivieren.",
- "no_thanks": "Nein, danke",
- "primary_button": "Aktivieren",
- "learn_more": "Erfahren Sie mehr.",
- "benefit_1_1": "Erfolgsrate:",
- "benefit_1_2": "99,5 %",
- "benefit_2_1": "Spart Ihnen",
- "benefit_2_2": "Geld",
- "benefit_3_1": "Echtzeit",
- "benefit_3_2": "Updates"
- },
"transaction_simulation": {
"title": "Geschätzte Saldoänderungen",
"description_1": "Jetzt können Sie das mögliche Ergebnis Ihrer Transaktionen sehen, bevor Sie sie tätigen!",
diff --git a/locales/languages/el.json b/locales/languages/el.json
index 9e21703a317..3534e629347 100644
--- a/locales/languages/el.json
+++ b/locales/languages/el.json
@@ -2940,20 +2940,6 @@
"description": "Πουλήστε τα κρυπτονομίσματά σας απευθείας στο MetaMask! Θα σας βοηθήσουμε να βρείτε προσφορές από αξιόπιστους παρόχους, ώστε να μπορείτε να πουλήσετε τα κρυπτονομίσματά σας με προσιτό, γρήγορο και ασφαλή τρόπο, κάθε φορά.",
"action_text": "Δοκιμάστε το"
},
- "stx": {
- "header": "Ενισχυμένη Προστασία Συναλλαγών",
- "description_1": "Ξεκλειδώστε υψηλότερα ποσοστά επιτυχίας, προστασία εκ των προτέρων και καλύτερη ορατότητα με τις Έξυπνες Συναλλαγές.",
- "description_2": "Διατίθεται μόνο στο Ethereum. Ενεργοποίηση ή απενεργοποίηση ανά πάσα στιγμή στις ρυθμίσεις.",
- "no_thanks": "Όχι, ευχαριστώ",
- "primary_button": "Ενεργοποίηση",
- "learn_more": "Μάθετε περισσότερα.",
- "benefit_1_1": "99,5% ποσοστό",
- "benefit_1_2": "επιτυχίας",
- "benefit_2_1": "Σας εξοικονομεί",
- "benefit_2_2": "χρήματα",
- "benefit_3_1": "Ενημερώσεις",
- "benefit_3_2": "σε πραγματικό χρόνο"
- },
"transaction_simulation": {
"title": "Εκτιμώμενες μεταβολές υπολοίπου",
"description_1": "Τώρα μπορείτε να βλέπετε την πιθανή απόδοση των συναλλαγών σας πριν τις πραγματοποιήσετε!",
diff --git a/locales/languages/en.json b/locales/languages/en.json
index 9c371ef2bde..32590e90368 100644
--- a/locales/languages/en.json
+++ b/locales/languages/en.json
@@ -2963,20 +2963,6 @@
"description": "Sell your crypto directly in MetaMask! We’ll help you find quotes from trusted providers, so you can sell your crypto in an accessible, fast, and secure way, every time.",
"action_text": "Try it out"
},
- "stx": {
- "header": "Enhanced Transaction Protection",
- "description_1": "Unlock higher success rates, frontrunning protection, and better visibility with Smart Transactions.",
- "description_2": "Only available on Ethereum. Enable or disable any time in settings.",
- "no_thanks": "No thanks",
- "primary_button": "Enable",
- "learn_more": "Learn more.",
- "benefit_1_1": "99.5% success",
- "benefit_1_2": "rate",
- "benefit_2_1": "Saves you",
- "benefit_2_2": "money",
- "benefit_3_1": "Real-time",
- "benefit_3_2": "updates"
- },
"transaction_simulation": {
"title": "Estimated balance changes",
"description_1": "Now you can see the potential outcome of your transactions before you make them!",
diff --git a/locales/languages/es.json b/locales/languages/es.json
index a3dd4f40651..77d8ec3da9c 100644
--- a/locales/languages/es.json
+++ b/locales/languages/es.json
@@ -2940,20 +2940,6 @@
"description": "¡Venda su cripto directamente en MetaMask! Lo ayudaremos a encontrar cotizaciones de proveedores confiables, para que pueda vender su cripto de manera accesible, rápida y segura, en todo momento.",
"action_text": "Inténtelo"
},
- "stx": {
- "header": "Protección mejorada de transacciones",
- "description_1": "Desbloquee índices de éxito más altos, protección contra frontrunning y mejor visibilidad con transacciones inteligentes.",
- "description_2": "Solo disponible en Ethereum. Active o desactive en cualquier momento en la configuración.",
- "no_thanks": "No, gracias",
- "primary_button": "Activar",
- "learn_more": "Más información.",
- "benefit_1_1": "99,5 % de índice",
- "benefit_1_2": "de éxito",
- "benefit_2_1": "Le permite ahorrar",
- "benefit_2_2": "dinero",
- "benefit_3_1": "Tiempo real",
- "benefit_3_2": "actualizaciones"
- },
"transaction_simulation": {
"title": "Cambios de saldo estimados",
"description_1": "¡Ahora puede ver el resultado potencial de sus transacciones antes de realizarlas!",
diff --git a/locales/languages/fr.json b/locales/languages/fr.json
index e97d53f27fc..6639e3d0060 100644
--- a/locales/languages/fr.json
+++ b/locales/languages/fr.json
@@ -2940,20 +2940,6 @@
"description": "Vendez vos cryptomonnaies directement dans MetaMask ! Nous vous aiderons à trouver des cotations auprès de fournisseurs de confiance, afin que vous puissiez vendre rapidement et en toute sécurité vos cryptomonnaies.",
"action_text": "Essayez cette fonctionnalité"
},
- "stx": {
- "header": "Protection renforcée des transactions",
- "description_1": "Bénéficiez de taux de réussite plus élevés, d’une protection contre le « front running » et d’une meilleure visibilité grâce aux transactions intelligentes.",
- "description_2": "Disponible uniquement sur Ethereum. Vous pouvez activer ou désactiver cette option à tout moment dans les paramètres.",
- "no_thanks": "Non, merci",
- "primary_button": "Activer",
- "learn_more": "En savoir plus.",
- "benefit_1_1": "Taux de réussite de",
- "benefit_1_2": "99,5 %",
- "benefit_2_1": "Vous fait économiser",
- "benefit_2_2": "de l’argent",
- "benefit_3_1": "Mises à jour",
- "benefit_3_2": "en temps réel"
- },
"transaction_simulation": {
"title": "Estimation des changements de solde",
"description_1": "Vous pouvez désormais connaître le résultat potentiel de vos transactions avant de les effectuer !",
diff --git a/locales/languages/hi.json b/locales/languages/hi.json
index bb30b92c6dc..bb5575486cf 100644
--- a/locales/languages/hi.json
+++ b/locales/languages/hi.json
@@ -2940,20 +2940,6 @@
"description": "अपना क्रिप्टो सीधे MetaMask में बेचें! हम आपको भरोसेमंद प्रोवाइडर्स से कोटेशन पाने में मदद करेंगे, ताकि आप हर बार अपने क्रिप्टो को एक्सेस किए जा सकने वाले, तेज़ और सुरक्षित तरीके से बेच सकें।",
"action_text": "इसे आज़माकर देखें"
},
- "stx": {
- "header": "उन्नत ट्रांसेक्शन सुरक्षा",
- "description_1": "स्मार्ट ट्रांसेक्शन के साथ उच्च सफलता दर, फ्रंटरनिंग सुरक्षा और बेहतर दृश्यता अनलॉक करें।",
- "description_2": "केवल Ethereum पर उपलब्ध है। सेटिंग्स में किसी भी समय चालू करें या बंद करें।",
- "no_thanks": "जी नहीं, धन्यवाद",
- "primary_button": "चालू करें",
- "learn_more": "अधिक जानें।",
- "benefit_1_1": "99.5% सफलता",
- "benefit_1_2": "दर",
- "benefit_2_1": "आपका पैसा",
- "benefit_2_2": "बचाता है",
- "benefit_3_1": "रियल टाइम",
- "benefit_3_2": "अपडेट"
- },
"transaction_simulation": {
"title": "अनुमानित बैलेंस अमाउंट में बदलाव",
"description_1": "अब आप अपने ट्रांसेक्शन करने से पहले उनका पोटेंशियल आउटकम देख सकते हैं!",
diff --git a/locales/languages/id.json b/locales/languages/id.json
index df78ae5c2eb..d48afddc7d6 100644
--- a/locales/languages/id.json
+++ b/locales/languages/id.json
@@ -2940,20 +2940,6 @@
"description": "Jual kripto langsung di MetaMask! Kami akan membantu menemukan penawaran harga dari penyedia tepercaya, sehingga Anda dapat menjual kripto dengan cara yang mudah diakses, cepat, dan aman, setiap saat.",
"action_text": "Cobalah"
},
- "stx": {
- "header": "Peningkatan Perlindungan Transaksi",
- "description_1": "Raih tingkat keberhasilan yang lebih tinggi, perlindungan frontrunning, dan visibilitas yang lebih baik dengan Transaksi Pintar.",
- "description_2": "Hanya tersedia di Ethereum. Aktifkan atau nonaktifkan setiap saat di pengaturan.",
- "no_thanks": "Tidak, terima kasih",
- "primary_button": "Aktifkan",
- "learn_more": "Selengkapnya.",
- "benefit_1_1": "Keberhasilan 99,5%",
- "benefit_1_2": "tingkat",
- "benefit_2_1": "Menghemat",
- "benefit_2_2": "uang",
- "benefit_3_1": "Waktu nyata",
- "benefit_3_2": "pembaruan"
- },
"transaction_simulation": {
"title": "Estimasi perubahan saldo",
"description_1": "Kini Anda dapat melihat potensi hasil transaksi sebelum melakukannya!",
diff --git a/locales/languages/ja.json b/locales/languages/ja.json
index 494027431d1..38fa89f78e4 100644
--- a/locales/languages/ja.json
+++ b/locales/languages/ja.json
@@ -2940,20 +2940,6 @@
"description": "MetaMaskで直接仮想通貨を売却!信頼できるプロバイダーからのクォートを取得して、毎回簡単・迅速・安全に仮想通貨を売却できます。",
"action_text": "お試しください"
},
- "stx": {
- "header": "強化されたトランザクション保護",
- "description_1": "スマートトランザクションで、成功率を上げ、フロントランニングを防ぎ、可視性を高めましょう。",
- "description_2": "イーサリアムでのみご利用いただけ、いつでも設定で有効・無効を切り替えられます。",
- "no_thanks": "いいえ、結構です",
- "primary_button": "有効にする",
- "learn_more": "詳細。",
- "benefit_1_1": "99.5%の",
- "benefit_1_2": "成功率",
- "benefit_2_1": "お金を",
- "benefit_2_2": "節約できます",
- "benefit_3_1": "リアルタイム",
- "benefit_3_2": "最新情報"
- },
"transaction_simulation": {
"title": "予測される残高の増減",
"description_1": "トランザクションを実行する前に、予測される結果を確認できるようになりました!",
diff --git a/locales/languages/ko.json b/locales/languages/ko.json
index 9ce269e22d9..d3ca23a79ae 100644
--- a/locales/languages/ko.json
+++ b/locales/languages/ko.json
@@ -2940,20 +2940,6 @@
"description": "MetaMask에서 바로 암호화폐를 매도하세요! 신뢰할 수 있는 제공업체의 견적을 찾을 수 있도록 도와드립니다. 언제나 쉽고 빠르며 안전한 방법으로 암호화폐를 매도할 수 있습니다.",
"action_text": "사용해 보세요"
},
- "stx": {
- "header": "트랜잭션 보호 강화",
- "description_1": "스마트 트랜잭션으로 선행거래를 방지하고 더 높은 성공률과 가시성을 확보하세요.",
- "description_2": "이더리움에서만 사용할 수 있습니다. 설정에서 언제든지 활성화하거나 비활성화할 수 있습니다.",
- "no_thanks": "아니요, 괜찮습니다",
- "primary_button": "활성화",
- "learn_more": "자세히 알아보세요.",
- "benefit_1_1": "99.5% 성공",
- "benefit_1_2": "률",
- "benefit_2_1": "비용",
- "benefit_2_2": "절감",
- "benefit_3_1": "실시간",
- "benefit_3_2": "업데이트"
- },
"transaction_simulation": {
"title": "예상 잔액 변동",
"description_1": "이제 트랜잭션 전에 예상 결과를 확인할 수 있습니다!",
diff --git a/locales/languages/pt.json b/locales/languages/pt.json
index d449ba5434d..bdffcfbb85b 100644
--- a/locales/languages/pt.json
+++ b/locales/languages/pt.json
@@ -2940,20 +2940,6 @@
"description": "Venda seus criptoativos diretamente na MetaMask! Vamos ajudar você a encontrar cotações de provedores de confiança para que possa vendê-los de forma acessível, rápida e segura, sempre.",
"action_text": "Experimente"
},
- "stx": {
- "header": "Proteção de transações aprimorada",
- "description_1": "Desbloqueie taxas de sucesso maiores, proteção contra front running e melhor visibilidade com as transações inteligentes.",
- "description_2": "Disponível somente na Ethereum. Ative ou desative a qualquer momento nas configurações.",
- "no_thanks": "Não, obrigado",
- "primary_button": "Ativar",
- "learn_more": "Saiba mais.",
- "benefit_1_1": "99,5% de taxa de",
- "benefit_1_2": "sucesso",
- "benefit_2_1": "Faz você economizar",
- "benefit_2_2": "dinheiro",
- "benefit_3_1": "em tempo real",
- "benefit_3_2": "Atualizações"
- },
"transaction_simulation": {
"title": "Alterações de saldo estimadas",
"description_1": "Agora você pode ver os possíveis resultados de suas transações antes de realizá-las!",
diff --git a/locales/languages/ru.json b/locales/languages/ru.json
index 0b38da80fcc..c3e0c38e8fb 100644
--- a/locales/languages/ru.json
+++ b/locales/languages/ru.json
@@ -2940,20 +2940,6 @@
"description": "Продавайте свою криптовалюту прямо в MetaMask! Мы поможем вам найти котировки от надежных поставщиков, чтобы вы всегда могли продавать свою криптовалюту доступным, быстрым и безопасным способом.",
"action_text": "Попробовать"
},
- "stx": {
- "header": "Улучшенная защита транзакций",
- "description_1": "Откройте для себя более высокие коэффициенты успеха, передовую защиту и лучшую прозрачность с помощью смарт-транзакций.",
- "description_2": "Доступно только на Ethereum. Включайте или отключайте в любое время в настройках.",
- "no_thanks": "Нет, спасибо",
- "primary_button": "Включить",
- "learn_more": "Подробнее.",
- "benefit_1_1": "Показатель успеха:",
- "benefit_1_2": "99,5 %",
- "benefit_2_1": "Экономит вам",
- "benefit_2_2": "деньги",
- "benefit_3_1": "Статус",
- "benefit_3_2": "в реальном времени"
- },
"transaction_simulation": {
"title": "Предполагаемые изменения баланса",
"description_1": "Теперь вы можете увидеть потенциальный результат ваших транзакций еще до их совершения!",
diff --git a/locales/languages/tl.json b/locales/languages/tl.json
index 70f54a9472a..f0588e1f4b8 100644
--- a/locales/languages/tl.json
+++ b/locales/languages/tl.json
@@ -2940,20 +2940,6 @@
"description": "Ibenta ang iyong crypto nang direkta sa MetaMask! Tutulungan ka naming maghanap ng mga quote mula sa mga mapagkakatiwalaang provider, nang sa gayon ay maibenta mo ang iyong crypto sa isang accessible, mabilis, at secure na paraan, sa bawat pagkakataon.",
"action_text": "Subukan ito"
},
- "stx": {
- "header": "Pinahusay na Proteksyon sa Transaksyon",
- "description_1": "I-unlock ang mas mataas na tiyansa ng tagumpay, proteksyon sa frontrunning, at mas mahusay na visibility sa mga Smart Transaction.",
- "description_2": "Available lamang sa Ethereum. I-enable o i-disable anumang oras sa mga setting.",
- "no_thanks": "Salamat na lang",
- "primary_button": "I-enable",
- "learn_more": "Matuto pa.",
- "benefit_1_1": "99.5% tagumpay",
- "benefit_1_2": "rate",
- "benefit_2_1": "Nakakatipid ng",
- "benefit_2_2": "pera",
- "benefit_3_1": "Real-time",
- "benefit_3_2": "mga update"
- },
"transaction_simulation": {
"title": "Tinatayang mga pagbabago sa balanse",
"description_1": "Maaari mo na ngayong makita ang potensyal na resulta ng iyong mga transaksyon bago mo gawin ang mga iyon!",
diff --git a/locales/languages/tr.json b/locales/languages/tr.json
index 7c6a706d6f1..a4ac3edbd71 100644
--- a/locales/languages/tr.json
+++ b/locales/languages/tr.json
@@ -2940,20 +2940,6 @@
"description": "Kriptonuzu doğrudan MetaMask'ta satın! Kriptonuzu her defasında erişilebilir, hızlı ve güvenli bir şekilde satabilmeniz için güvenilir sağlayıcılardan teklifleri bulmanıza yardımcı olacağız.",
"action_text": "Deneyin"
},
- "stx": {
- "header": "İyileştirilmiş İşlem Koruması",
- "description_1": "Akıllı İşlemler ile daha yüksek başarı oranlarının, arkadan çalıştırma korumasının ve daha iyi görünürlüğün kilidini açın.",
- "description_2": "Sadece Ethereum'da mevcuttur. Dilediğiniz zaman ayarlar kısmında etkinleştirin veya devre dışı bırakın.",
- "no_thanks": "Hayır, teşekkürler",
- "primary_button": "Etkinleştir",
- "learn_more": "Daha fazla bilgi edinin.",
- "benefit_1_1": "%99,5 başarı oranı",
- "benefit_1_2": "oran",
- "benefit_2_1": "Paradan",
- "benefit_2_2": "tasarruf sağlar",
- "benefit_3_1": "Gerçek zamanlı",
- "benefit_3_2": "güncellemeler"
- },
"transaction_simulation": {
"title": "Tahmini bakiye değişiklikleri",
"description_1": "Artık gerçekleştirmeden önce işlemlerinizin potansiyel sonuçlarını görebilirsiniz!",
diff --git a/locales/languages/vi.json b/locales/languages/vi.json
index 629f4375336..f065c68b4a0 100644
--- a/locales/languages/vi.json
+++ b/locales/languages/vi.json
@@ -2940,20 +2940,6 @@
"description": "Bán tiền mã hóa trực tiếp trong MetaMask! Chúng tôi sẽ giúp bạn tìm báo giá từ các nhà cung cấp đáng tin cậy, qua đó bạn có thể bán tiền mã hóa mọi lúc một cách dễ dàng, nhanh chóng và an toàn.",
"action_text": "Thử ngay"
},
- "stx": {
- "header": "Tăng cường bảo vệ giao dịch",
- "description_1": "Đạt tỷ lệ thành công cao hơn, bảo vệ chống hành vi lợi dụng thông tin biết trước và khả năng hiển thị tốt hơn với Giao dịch thông minh.",
- "description_2": "Chỉ có sẵn trên Ethereum. Có thể bật/tắt bất cứ lúc nào trong phần Cài đặt.",
- "no_thanks": "Không, cảm ơn",
- "primary_button": "Bật",
- "learn_more": "Tìm hiểu thêm.",
- "benefit_1_1": "Tỷ lệ thành công",
- "benefit_1_2": "99,5%",
- "benefit_2_1": "Tiết kiệm tiền",
- "benefit_2_2": "của bạn",
- "benefit_3_1": "Cập nhật",
- "benefit_3_2": "theo thời gian thực"
- },
"transaction_simulation": {
"title": "Thay đổi số dư ước tính",
"description_1": "Bây giờ bạn có thể xem kết quả tiềm năng của các giao dịch trước khi thực hiện!",
diff --git a/locales/languages/zh.json b/locales/languages/zh.json
index 519544cb79f..8370f2577e7 100644
--- a/locales/languages/zh.json
+++ b/locales/languages/zh.json
@@ -2940,20 +2940,6 @@
"description": "直接在 MetaMask 卖出您的加密货币!我们将帮助您从值得信赖的提供商处获取报价,以便您每次都能够以便捷、快速、安全的方式卖出您的加密货币。",
"action_text": "试试看吧"
},
- "stx": {
- "header": "增强型交易保护",
- "description_1": "通过智能交易解锁更高的成功率、抢先交易保护和更高的透明度。",
- "description_2": "仅适用于以太坊。可随时在设置中启用或禁用。",
- "no_thanks": "不,谢谢",
- "primary_button": "启用",
- "learn_more": "了解更多。",
- "benefit_1_1": "99.5% 的成功",
- "benefit_1_2": "率",
- "benefit_2_1": "为您省",
- "benefit_2_2": "钱",
- "benefit_3_1": "实时",
- "benefit_3_2": "更新"
- },
"transaction_simulation": {
"title": "预计余额变化",
"description_1": "现在,您可以在进行交易之前看到交易的潜在结果!",
diff --git a/package.json b/package.json
index 28ff2385193..8b4657bdf7c 100644
--- a/package.json
+++ b/package.json
@@ -168,7 +168,7 @@
"@metamask/phishing-controller": "^12.0.3",
"@metamask/post-message-stream": "^8.0.0",
"@metamask/ppom-validator": "0.35.1",
- "@metamask/preferences-controller": "^13.1.0",
+ "@metamask/preferences-controller": "^13.3.0",
"@metamask/profile-sync-controller": "^0.9.7",
"@metamask/react-native-actionsheet": "2.4.2",
"@metamask/react-native-button": "^3.0.0",
diff --git a/patches/@metamask+preferences-controller+13.1.0.patch b/patches/@metamask+preferences-controller+13.3.0.patch
similarity index 53%
rename from patches/@metamask+preferences-controller+13.1.0.patch
rename to patches/@metamask+preferences-controller+13.3.0.patch
index 95e65bb7e0f..8db07685937 100644
--- a/patches/@metamask+preferences-controller+13.1.0.patch
+++ b/patches/@metamask+preferences-controller+13.3.0.patch
@@ -1,5 +1,5 @@
diff --git a/node_modules/@metamask/preferences-controller/dist/PreferencesController.cjs b/node_modules/@metamask/preferences-controller/dist/PreferencesController.cjs
-index 97182f2..107ef23 100644
+index a36c32e..2cf3d16 100644
--- a/node_modules/@metamask/preferences-controller/dist/PreferencesController.cjs
+++ b/node_modules/@metamask/preferences-controller/dist/PreferencesController.cjs
@@ -17,7 +17,7 @@ const metadata = {
@@ -11,19 +11,20 @@ index 97182f2..107ef23 100644
securityAlertsEnabled: { persist: true, anonymous: true },
selectedAddress: { persist: true, anonymous: false },
showTestNetworks: { persist: true, anonymous: true },
-@@ -26,6 +26,11 @@ const metadata = {
+@@ -26,10 +26,11 @@ const metadata = {
useTokenDetection: { persist: true, anonymous: true },
smartTransactionsOptInStatus: { persist: true, anonymous: false },
useTransactionSimulations: { persist: true, anonymous: true },
-+ useSafeChainsListValidation: { persist: true, anonymous: true },
-+ showMultiRpcModal: { persist: false, anonymous: false },
-+ tokenSortConfig: { persist: true, anonymous: false },
+- useMultiRpcMigration: { persist: true, anonymous: true },
++ showMultiRpcModal: { persist: true, anonymous: true },
+ useSafeChainsListValidation: { persist: true, anonymous: true },
+ tokenSortConfig: { persist: true, anonymous: true },
+ privacyMode: { persist: true, anonymous: true },
+ tokenNetworkFilter: { persist: true, anonymous: false },
-+ privacyMode: { persist: true, anonymous: true },
};
const name = 'PreferencesController';
/**
-@@ -41,7 +46,7 @@ function getDefaultPreferencesState() {
+@@ -45,7 +46,7 @@ function getDefaultPreferencesState() {
isIpfsGatewayEnabled: true,
isMultiAccountBalancesEnabled: true,
lostIdentities: {},
@@ -32,23 +33,27 @@ index 97182f2..107ef23 100644
securityAlertsEnabled: false,
selectedAddress: '',
showIncomingTransactions: {
-@@ -71,6 +76,15 @@ function getDefaultPreferencesState() {
+@@ -73,16 +74,17 @@ function getDefaultPreferencesState() {
+ showTestNetworks: false,
+ useNftDetection: false,
useTokenDetection: true,
- smartTransactionsOptInStatus: false,
- useTransactionSimulations: true,
-+ useSafeChainsListValidation: true,
+- useMultiRpcMigration: true,
+ showMultiRpcModal: false,
-+ tokenSortConfig: {
-+ key: 'tokenFiatBalance',
-+ order: 'dsc',
-+ sortCallback: 'stringNumeric'
-+ },
+ smartTransactionsOptInStatus: true,
+ useTransactionSimulations: true,
+ useSafeChainsListValidation: true,
+ tokenSortConfig: {
+- key: 'tokenFiatAmount',
++ key: 'tokenFiatBalance',
+ order: 'dsc',
+ sortCallback: 'stringNumeric',
+ },
+ privacyMode: false,
+ tokenNetworkFilter: {},
-+ privacyMode: false,
};
}
exports.getDefaultPreferencesState = getDefaultPreferencesState;
-@@ -209,22 +223,22 @@ class PreferencesController extends base_controller_1.BaseController {
+@@ -221,22 +223,22 @@ class PreferencesController extends base_controller_1.BaseController {
* @param useNftDetection - Boolean indicating user preference on NFT detection.
*/
setUseNftDetection(useNftDetection) {
@@ -78,43 +83,29 @@ index 97182f2..107ef23 100644
state.useNftDetection = false;
}
});
-@@ -305,6 +319,59 @@ class PreferencesController extends base_controller_1.BaseController {
- state.useTransactionSimulations = useTransactionSimulations;
- });
- }
-+ /**
-+ * Toggle the use safe chains list validation.
-+ *
-+ * @param useSafeChainsListValidation - Boolean indicating user preference on using chainid.network third part to check safe networks.
-+ */
-+ setUseSafeChainsListValidation(useSafeChainsListValidation) {
-+ this.update((state) => {
-+ state.useSafeChainsListValidation = useSafeChainsListValidation;
-+ });
-+ }
-+ /**
-+ * Toggle multi rpc migration modal.
-+ *
+@@ -300,13 +302,13 @@ class PreferencesController extends base_controller_1.BaseController {
+ /**
+ * Toggle multi rpc migration modal.
+ *
+- * @param useMultiRpcMigration - Boolean indicating if the multi rpc modal will be displayed or not.
+ * @param showMultiRpcModal - Boolean indicating if the multi rpc modal will be displayed or not.
-+ */
+ */
+- setUseMultiRpcMigration(useMultiRpcMigration) {
+ setShowMultiRpcModal(showMultiRpcModal) {
-+ this.update((state) => {
-+ state.showMultiRpcModal = showMultiRpcModal;
-+ if (showMultiRpcModal) {
-+ state.showMultiRpcModal = false;
-+ }
-+ });
-+ }
-+ /**
-+ * Set the token sort configuration setting.
-+ *
-+ * @param tokenSortConfig - Object describing token sort configuration.
-+ */
-+ setTokenSortConfig(tokenSortConfig) {
-+ this.update((state) => {
-+ state.tokenSortConfig = tokenSortConfig;
-+ });
-+ }
+ this.update((state) => {
+- state.useMultiRpcMigration = useMultiRpcMigration;
+- if (!useMultiRpcMigration) {
+- state.useMultiRpcMigration = false;
++ state.showMultiRpcModal = showMultiRpcModal;
++ if (!showMultiRpcModal) {
++ state.showMultiRpcModal = false;
+ }
+ });
+ }
+@@ -360,6 +362,16 @@ class PreferencesController extends base_controller_1.BaseController {
+ state.privacyMode = privacyMode;
+ });
+ }
+ /**
+ * Set the token network filter configuration setting.
+ *
@@ -124,25 +115,15 @@ index 97182f2..107ef23 100644
+ this.update((state) => {
+ state.tokenNetworkFilter = tokenNetworkFilter;
+ });
-+ }
-+ /**
-+ * A setter for the user preferences to enable/disable privacy mode.
-+ *
-+ * @param privacyMode - true to enable privacy mode, false to disable it.
-+ */
-+ setPrivacyMode(privacyMode) {
-+ this.update((state) => {
-+ state.privacyMode = privacyMode;
-+ });
+ }
}
exports.PreferencesController = PreferencesController;
_PreferencesController_instances = new WeakSet(), _PreferencesController_syncIdentities = function _PreferencesController_syncIdentities(addresses) {
diff --git a/node_modules/@metamask/preferences-controller/dist/PreferencesController.d.cts b/node_modules/@metamask/preferences-controller/dist/PreferencesController.d.cts
-index 04a9d6f..5885d5b 100644
+index b587817..ad05486 100644
--- a/node_modules/@metamask/preferences-controller/dist/PreferencesController.d.cts
+++ b/node_modules/@metamask/preferences-controller/dist/PreferencesController.d.cts
-@@ -65,7 +65,7 @@ export type PreferencesState = {
+@@ -70,7 +70,7 @@ export type PreferencesState = {
/**
* Controls whether the OpenSea API is used
*/
@@ -151,55 +132,27 @@ index 04a9d6f..5885d5b 100644
/**
* Controls whether "security alerts" are enabled
*/
-@@ -100,6 +100,26 @@ export type PreferencesState = {
- * Controls whether transaction simulations are enabled
+@@ -108,7 +108,7 @@ export type PreferencesState = {
+ /**
+ * Controls whether Multi rpc modal is displayed or not
*/
- useTransactionSimulations: boolean;
-+ /**
-+ * Controls whether to use the safe chains list validation
-+ */
-+ useSafeChainsListValidation: boolean;
-+ /**
-+ * Controls whether Multi rpc modal is displayed or not
-+ */
+- useMultiRpcMigration: boolean;
+ showMultiRpcModal: boolean;
-+ /**
-+ * Controls token sorting controls
-+ */
-+ tokenSortConfig: Record;
+ /**
+ * Controls whether to use the safe chains list validation
+ */
+@@ -121,6 +121,10 @@ export type PreferencesState = {
+ * Controls whether balance and assets are hidden or not
+ */
+ privacyMode: boolean;
+ /**
+ * Controls token filtering controls
+ */
+ tokenNetworkFilter: Record;
-+ /**
-+ * Controls whether balance and assets are hidden or not
-+ */
-+ privacyMode: boolean;
};
declare const name = "PreferencesController";
export type PreferencesControllerGetStateAction = ControllerGetStateAction;
-@@ -120,7 +140,7 @@ export declare function getDefaultPreferencesState(): {
- isIpfsGatewayEnabled: boolean;
- isMultiAccountBalancesEnabled: boolean;
- lostIdentities: {};
-- openSeaEnabled: boolean;
-+ displayNftMedia: boolean;
- securityAlertsEnabled: boolean;
- selectedAddress: string;
- showIncomingTransactions: {
-@@ -150,6 +170,11 @@ export declare function getDefaultPreferencesState(): {
- useTokenDetection: boolean;
- smartTransactionsOptInStatus: boolean;
- useTransactionSimulations: boolean;
-+ useSafeChainsListValidation: boolean;
-+ showMultiRpcModal: boolean;
-+ tokenSortConfig: Record;
-+ tokenNetworkFilter: Record;
-+ privacyMode: boolean;
- };
- /**
- * Controller that stores shared settings and exposes convenience methods
-@@ -218,11 +243,11 @@ export declare class PreferencesController extends BaseController): void;
+ /**
+ * A setter for the user to opt into smart transactions
+ *
+@@ -274,6 +278,12 @@ export declare class PreferencesController extends BaseController): void;
-+ /**
-+ * A setter for the user preferences to enable/disable privacy mode.
-+ *
-+ * @param privacyMode - true to enable privacy mode, false to disable it.
-+ */
-+ setPrivacyMode(privacyMode: boolean): void;
}
export default PreferencesController;
//# sourceMappingURL=PreferencesController.d.cts.map
-\ No newline at end of file
diff --git a/wdio/screen-objects/Modals/TransactionProtectionModal.js b/wdio/screen-objects/Modals/TransactionProtectionModal.js
deleted file mode 100644
index 14b3dc467d8..00000000000
--- a/wdio/screen-objects/Modals/TransactionProtectionModal.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import {
- TransactionProtectionModalSelectorText
-} from '../../../e2e/selectors/Transactions/TransactionProtectionModal.selectors';
-import Gestures from '../../helpers/Gestures';
-import Selectors from '../../helpers/Selectors';
-
-class TransactionProtectionModal {
- get header() {
- return Selectors.getXpathElementByText(
- TransactionProtectionModalSelectorText.HEADER,
- );
- }
-
- get enableButton() {
- return Selectors.getXpathElementByText(
- TransactionProtectionModalSelectorText.ENABLE_BUTTON,
- );
- }
-
- async isVisible() {
- await expect(this.header).toBeDisplayed();
- }
-
- async isNotVisible() {
- await expect(this.header).not.toBeDisplayed();
- }
-
- async tapEnableButton() {
- await Gestures.waitAndTap(this.enableButton);
- }
-}
-
-export default new TransactionProtectionModal();
diff --git a/wdio/step-definitions/common-steps.js b/wdio/step-definitions/common-steps.js
index 69da7223da4..a4e3313d3b4 100644
--- a/wdio/step-definitions/common-steps.js
+++ b/wdio/step-definitions/common-steps.js
@@ -17,7 +17,6 @@ import WhatsNewModal from '../screen-objects/Modals/WhatsNewModal';
import Gestures from '../helpers/Gestures';
import OnboardingSucessScreen from '../screen-objects/OnboardingSucessScreen.js';
import ExperienceEnhancerModal from '../screen-objects/Modals/ExperienceEnhancerModal';
-import TransactionProtectionModal from '../screen-objects/Modals/TransactionProtectionModal';
import SettingsScreen from '../screen-objects/SettingsScreen';
Then(/^the Welcome screen is displayed$/, async () => {
@@ -320,16 +319,6 @@ Given(/^I close all the onboarding modals$/, async () => {
console.log('The onboarding modal is not visible');
}
- try {
- await TransactionProtectionModal.isVisible();
- await TransactionProtectionModal.tapEnableButton();
- await TransactionProtectionModal.isNotVisible();
- } catch {
- /* eslint-disable no-console */
-
- console.log('The whats new modal is not visible');
- }
-
try {
// Handle Marketing consent modal
diff --git a/yarn.lock b/yarn.lock
index a714ab0e966..c47be0b7964 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5273,13 +5273,13 @@
eslint-plugin-n "^16.6.2"
json-rpc-random-id "^1.0.1"
-"@metamask/preferences-controller@^13.1.0":
- version "13.1.0"
- resolved "https://registry.yarnpkg.com/@metamask/preferences-controller/-/preferences-controller-13.1.0.tgz#e407f6a0879d5fa4178caa0bdd4e310d178f0b34"
- integrity sha512-fRURU9ZJaztJ+dPq+DrLbEcddhAoRDO5poagb+T8cFmIDxvTA1OKR1Bz8mgn91xMTuWMg95M+bPnb5dbRbRViw==
+"@metamask/preferences-controller@^13.3.0":
+ version "13.3.0"
+ resolved "https://registry.yarnpkg.com/@metamask/preferences-controller/-/preferences-controller-13.3.0.tgz#5c10001148dc335d8dcc3e3118154961b1a2f377"
+ integrity sha512-USPwqvCxk9C4GlpZRrd9hYhpZz2vpBl8S6TyJQeX0maY2m+vrbahhUukq/6zPWJEjkthqKe8Ndu5KKKCXv1Fyg==
dependencies:
- "@metamask/base-controller" "^7.0.1"
- "@metamask/controller-utils" "^11.3.0"
+ "@metamask/base-controller" "^7.0.2"
+ "@metamask/controller-utils" "^11.4.2"
"@metamask/profile-sync-controller@^0.9.7":
version "0.9.7"