Skip to content

Commit 30df005

Browse files
committed
fix e2e tests
1 parent 4e31e04 commit 30df005

File tree

6 files changed

+20
-14
lines changed

6 files changed

+20
-14
lines changed

app/scripts/lib/ppom/ppom-middleware.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,12 @@ import {
88
BlockaidResultType,
99
} from '../../../../shared/constants/security-provider';
1010
import { CHAIN_IDS } from '../../../../shared/constants/network';
11+
import { SIGNING_METHODS } from '../../../../shared/constants/transaction';
1112
import { PreferencesController } from '../../controllers/preferences';
1213
import { SecurityAlertResponse } from '../transaction/util';
1314

1415
const { sentry } = global as any;
1516

16-
export const SIGNING_METHODS = Object.freeze([
17-
'eth_sign',
18-
'eth_signTypedData',
19-
'eth_signTypedData_v1',
20-
'eth_signTypedData_v3',
21-
'eth_signTypedData_v4',
22-
'personal_sign',
23-
]);
24-
2517
const CONFIRMATION_METHODS = Object.freeze([
2618
'eth_sendRawTransaction',
2719
'eth_sendTransaction',

app/scripts/lib/transaction/util.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,12 @@ export async function addDappTransaction(
8484

8585
export async function addTransaction(
8686
request: AddTransactionRequest,
87+
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
8788
updateSecurityAlertResponseByTxId: (
8889
reqId: string | undefined,
8990
securityAlertResponse: SecurityAlertResponse,
9091
) => void,
92+
///: END:ONLY_INCLUDE_IF
9193
): Promise<TransactionMeta> {
9294
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
9395
const {

app/scripts/metamask-controller.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ import { BrowserRuntimePostMessageStream } from '@metamask/post-message-stream';
143143
import { toChecksumHexAddress } from '../../shared/modules/hexstring-utils';
144144
///: END:ONLY_INCLUDE_IF
145145

146-
import { AssetType, TokenStandard } from '../../shared/constants/transaction';
146+
import {
147+
AssetType,
148+
TokenStandard,
149+
SIGNING_METHODS,
150+
} from '../../shared/constants/transaction';
147151
import {
148152
GAS_API_BASE_URL,
149153
GAS_DEV_API_BASE_URL,
@@ -228,10 +232,7 @@ import { AddressBookPetnamesBridge } from './lib/AddressBookPetnamesBridge';
228232
import { AccountIdentitiesPetnamesBridge } from './lib/AccountIdentitiesPetnamesBridge';
229233

230234
///: BEGIN:ONLY_INCLUDE_IF(blockaid)
231-
import {
232-
createPPOMMiddleware,
233-
SIGNING_METHODS,
234-
} from './lib/ppom/ppom-middleware';
235+
import { createPPOMMiddleware } from './lib/ppom/ppom-middleware';
235236
import * as PPOMModule from './lib/ppom/ppom';
236237
///: END:ONLY_INCLUDE_IF
237238
import {

shared/constants/transaction.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ export const IN_PROGRESS_TRANSACTION_STATUSES = [
1010
TransactionStatus.submitted,
1111
];
1212

13+
export const SIGNING_METHODS = Object.freeze([
14+
'eth_sign',
15+
'eth_signTypedData',
16+
'eth_signTypedData_v1',
17+
'eth_signTypedData_v3',
18+
'eth_signTypedData_v4',
19+
'personal_sign',
20+
]);
21+
1322
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
1423
/**
1524
* Status for finalized transactions.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"outdatedBrowserWarningLastShown": "number",
3333
"nftsDetectionNoticeDismissed": false,
3434
"showTestnetMessageInDropdown": true,
35+
"signatureSecurityAlertResponses": false,
3536
"showBetaHeader": false,
3637
"showProductTour": true,
3738
"showNetworkBanner": true,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"outdatedBrowserWarningLastShown": "number",
6868
"nftsDetectionNoticeDismissed": false,
6969
"showTestnetMessageInDropdown": true,
70+
"signatureSecurityAlertResponses": false,
7071
"showBetaHeader": false,
7172
"showProductTour": true,
7273
"showNetworkBanner": true,

0 commit comments

Comments
 (0)