Skip to content

Commit 541afef

Browse files
committed
Fix tests and linting
1 parent 65ef981 commit 541afef

File tree

7 files changed

+18
-2
lines changed

7 files changed

+18
-2
lines changed

app/scripts/constants/sentry-state.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ export const SENTRY_BACKGROUND_STATE = {
6060
onboardingDate: false,
6161
currentExtensionPopupId: false,
6262
defaultHomeActiveTabName: true,
63+
enableEnforcedSimulations: true,
64+
enableEnforcedSimulationsForTransactions: false,
6365
fullScreenGasPollTokens: true,
6466
// TODO: Fix in https://github.com/MetaMask/metamask-extension/issues/31860
6567
// eslint-disable-next-line @typescript-eslint/naming-convention

shared/types/background.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ export type ControllerStatePropertiesEnumerated = {
134134
updateModalLastDismissedAt: AppStateControllerState['updateModalLastDismissedAt'];
135135
lastUpdatedAt: AppStateControllerState['lastUpdatedAt'];
136136
throttledOrigins: AppStateControllerState['throttledOrigins'];
137+
enableEnforcedSimulations: AppStateControllerState['enableEnforcedSimulations'];
138+
enableEnforcedSimulationsForTransactions: AppStateControllerState['enableEnforcedSimulationsForTransactions'];
137139
quoteRequest: BridgeControllerState['quoteRequest'];
138140
quotes: BridgeControllerState['quotes'];
139141
quotesInitialLoadTime: BridgeControllerState['quotesInitialLoadTime'];

test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@
5858
"switchedNetworkDetails": null,
5959
"currentExtensionPopupId": "number",
6060
"termsOfUseLastAgreed": "number",
61-
"snapsInstallPrivacyWarningShown": true
61+
"snapsInstallPrivacyWarningShown": true,
62+
"enableEnforcedSimulations": true,
63+
"enableEnforcedSimulationsForTransactions": "object"
6264
},
6365
"ApprovalController": {
6466
"pendingApprovals": "object",

test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,9 @@
370370
"encryptionKey": "string",
371371
"encryptionSalt": "string",
372372
"socialBackupsMetadata": "object",
373-
"srpSessionData": "object"
373+
"srpSessionData": "object",
374+
"enableEnforcedSimulations": true,
375+
"enableEnforcedSimulationsForTransactions": "object"
374376
},
375377
"ramps": "object",
376378
"send": "object",

test/integration/data/onboarding-completion-route.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@
8686
"detectedTokens": [],
8787
"dismissSeedBackUpReminder": false,
8888
"domains": {},
89+
"enableEnforcedSimulations": "boolean",
90+
"enableEnforcedSimulationsForTransactions": "object",
8991
"enableMV3TimestampSave": true,
9092
"enabledNetworkMap": {
9193
"eip155": {

ui/pages/confirmations/hooks/transactions/useIsEnforcedSimulationsSupported.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ function renderHook({
3939
}
4040

4141
describe('useIsEnforcedSimulationsSupported', () => {
42+
beforeEach(() => {
43+
process.env.ENABLE_ENFORCED_SIMULATIONS = true as never;
44+
});
45+
4246
it('returns true if supported', () => {
4347
const { result } = renderHook();
4448
expect(result.current).toBe(true);

ui/pages/confirmations/selectors/confirm.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ describe('confirm selectors', () => {
3939
},
4040
},
4141
approvalFlows: [],
42+
enableEnforcedSimulations: false,
43+
enableEnforcedSimulationsForTransactions: {},
4244
},
4345
};
4446

0 commit comments

Comments
 (0)