Skip to content

Commit 3ab6fe1

Browse files
committed
Merge remote-tracking branch 'origin/develop' into chloe-reorganize-e2e-2
2 parents 4b7773a + bbb372f commit 3ab6fe1

File tree

31 files changed

+1235
-33
lines changed

31 files changed

+1235
-33
lines changed

.circleci/config.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ workflows:
133133
- prep-build-multichain-test:
134134
requires:
135135
- prep-deps
136+
- prep-build-confirmation-redesign-test:
137+
requires:
138+
- prep-deps
136139
- prep-build-test-mv3:
137140
requires:
138141
- prep-deps
@@ -168,9 +171,15 @@ workflows:
168171
- test-e2e-chrome-multichain:
169172
requires:
170173
- prep-build-multichain-test
174+
- test-e2e-chrome-confirmation-redesign:
175+
requires:
176+
- prep-build-confirmation-redesign-test
171177
- test-e2e-firefox:
172178
requires:
173179
- prep-build-test
180+
- test-e2e-firefox-confirmation-redesign:
181+
requires:
182+
- prep-build-confirmation-redesign-test
174183
- test-e2e-chrome-rpc:
175184
requires:
176185
- prep-build-test
@@ -283,6 +292,8 @@ workflows:
283292
- test-e2e-chrome
284293
- test-e2e-chrome-multichain
285294
- test-e2e-chrome-multiple-providers
295+
- test-e2e-chrome-confirmation-redesign
296+
- test-e2e-firefox-confirmation-redesign
286297
- test-e2e-firefox
287298
- test-e2e-chrome-flask
288299
- test-e2e-firefox-flask
@@ -803,6 +814,27 @@ jobs:
803814
- dist-test-multichain
804815
- builds-test-multichain
805816

817+
prep-build-confirmation-redesign-test:
818+
executor: node-browsers-medium-plus
819+
steps:
820+
- run: *shallow-git-clone
821+
- attach_workspace:
822+
at: .
823+
- run:
824+
name: Build extension for testing
825+
command: ENABLE_CONFIRMATION_REDESIGN=1 yarn build:test
826+
- run:
827+
name: Move test build to 'dist-test' to avoid conflict with production build
828+
command: mv ./dist ./dist-test-confirmations
829+
- run:
830+
name: Move test zips to 'builds-test' to avoid conflict with production build
831+
command: mv ./builds ./builds-test-confirmations
832+
- persist_to_workspace:
833+
root: .
834+
paths:
835+
- dist-test-confirmations
836+
- builds-test-confirmations
837+
806838
prep-build-storybook:
807839
executor: node-browsers-medium-plus
808840
steps:
@@ -991,6 +1023,35 @@ jobs:
9911023
- store_test_results:
9921024
path: test/test-results/e2e
9931025

1026+
test-e2e-chrome-confirmation-redesign:
1027+
executor: node-browsers-medium-plus
1028+
parallelism: 20
1029+
steps:
1030+
- run: *shallow-git-clone
1031+
- attach_workspace:
1032+
at: .
1033+
- run:
1034+
name: Move test build to dist
1035+
command: mv ./dist-test-confirmations ./dist
1036+
- run:
1037+
name: Move test zips to builds
1038+
command: mv ./builds-test-confirmations ./builds
1039+
- run:
1040+
name: test:e2e:chrome-confirmation-redesign
1041+
command: |
1042+
if .circleci/scripts/test-run-e2e.sh
1043+
then
1044+
timeout 20m yarn test:e2e:chrome --retries 2
1045+
fi
1046+
no_output_timeout: 5m
1047+
environment:
1048+
ENABLE_CONFIRMATION_REDESIGN: 1
1049+
- store_artifacts:
1050+
path: test-artifacts
1051+
destination: test-artifacts
1052+
- store_test_results:
1053+
path: test/test-results/e2e
1054+
9941055
test-e2e-chrome-mv3:
9951056
executor: node-browsers-medium-plus
9961057
parallelism: 16
@@ -1260,6 +1321,36 @@ jobs:
12601321
- store_test_results:
12611322
path: test/test-results/e2e
12621323

1324+
test-e2e-firefox-confirmation-redesign:
1325+
executor: node-browsers-medium-plus
1326+
parallelism: 20
1327+
steps:
1328+
- run: *shallow-git-clone
1329+
- attach_workspace:
1330+
at: .
1331+
- run:
1332+
name: Move test build to dist
1333+
command: mv ./dist-test-confirmations ./dist
1334+
- run:
1335+
name: Move test zips to builds
1336+
command: mv ./builds-test-confirmations ./builds
1337+
- run:
1338+
name: test:e2e:firefox-confirmation-redesign
1339+
command: |
1340+
if .circleci/scripts/test-run-e2e.sh
1341+
then
1342+
timeout 20m yarn test:e2e:firefox --retries 2
1343+
fi
1344+
no_output_timeout: 5m
1345+
environment:
1346+
ENABLE_CONFIRMATION_REDESIGN: 1
1347+
- store_artifacts:
1348+
path: test-artifacts
1349+
destination: test-artifacts
1350+
- store_test_results:
1351+
path: test/test-results/e2e
1352+
1353+
12631354
benchmark:
12641355
executor: node-browsers-small
12651356
steps:

app/_locales/en/messages.json

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/scripts/controllers/permissions/enums.js

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export enum NOTIFICATION_NAMES {
2+
accountsChanged = 'metamask_accountsChanged',
3+
unlockStateChanged = 'metamask_unlockStateChanged',
4+
chainChanged = 'metamask_chainChanged',
5+
}

app/scripts/lib/rpc-method-middleware/handlers/index.js renamed to app/scripts/lib/rpc-method-middleware/handlers/index.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { MESSAGE_TYPE } from '../../../../../shared/constants/app';
12
import addEthereumChain from './add-ethereum-chain';
23
import ethAccounts from './eth-accounts';
34
import getProviderState from './get-provider-state';
@@ -16,7 +17,15 @@ import mmiSetAccountAndNetwork from './institutional/mmi-set-account-and-network
1617
import mmiOpenAddHardwareWallet from './institutional/mmi-open-add-hardware-wallet';
1718
///: END:ONLY_INCLUDE_IF
1819

19-
const handlers = [
20+
type MessageType = (typeof MESSAGE_TYPE)[keyof typeof MESSAGE_TYPE];
21+
22+
type HandlerInterface = {
23+
methodNames: MessageType[];
24+
implementation: unknown;
25+
hookNames?: { [key: string]: boolean };
26+
};
27+
28+
const handlers: HandlerInterface[] = [
2029
addEthereumChain,
2130
ethAccounts,
2231
getProviderState,
@@ -34,4 +43,5 @@ const handlers = [
3443
mmiOpenAddHardwareWallet,
3544
///: END:ONLY_INCLUDE_IF
3645
];
46+
3747
export default handlers;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@
327327
"@metamask/snaps-sdk": "^4.0.1",
328328
"@metamask/snaps-utils": "^7.1.1",
329329
"@metamask/transaction-controller": "^28.1.0",
330-
"@metamask/user-operation-controller": "^6.0.0",
330+
"@metamask/user-operation-controller": "^8.0.1",
331331
"@metamask/utils": "^8.2.1",
332332
"@ngraveio/bc-ur": "^1.1.12",
333333
"@noble/ciphers": "^0.5.2",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"activeTab": "object",
44
"appState": "object",
55
"confirm": "object",
6+
"confirmAlerts": "object",
67
"confirmTransaction": "object",
78
"gas": { "customData": { "price": null, "limit": null } },
89
"history": { "mostRecentOverviewPage": "/" },

0 commit comments

Comments
 (0)