Skip to content

Commit de5104b

Browse files
authored
Merge branch 'main' into feat/upgrade-ledger-library
2 parents e1abe95 + fad926a commit de5104b

File tree

294 files changed

+5360
-6558
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

294 files changed

+5360
-6558
lines changed

.circleci/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ version: 2.1
33
executors:
44
node-browsers-small:
55
docker:
6-
- image: cimg/node:20.18-browsers
6+
- image: cimg/node:22.13-browsers
77
resource_class: small
88
environment:
99
NODE_OPTIONS: --max_old_space_size=2048
1010
node-browsers-medium:
1111
docker:
12-
- image: cimg/node:20.18-browsers
12+
- image: cimg/node:22.13-browsers
1313
resource_class: medium
1414
environment:
1515
NODE_OPTIONS: --max_old_space_size=3072
@@ -21,7 +21,7 @@ executors:
2121
NODE_OPTIONS: --max_old_space_size=6144
2222
node-browsers-medium-plus:
2323
docker:
24-
- image: cimg/node:20.18-browsers
24+
- image: cimg/node:22.13-browsers
2525
resource_class: medium+
2626
environment:
2727
NODE_OPTIONS: --max_old_space_size=4096

.circleci/scripts/check_mmi_trigger.sh

-66
This file was deleted.

.depcheckrc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ignores:
2424
- '@metamask/phishing-warning' # statically hosted as part of some e2e tests
2525
- '@metamask/test-dapp'
2626
- '@metamask/design-tokens' # Only imported in index.css
27-
- '@tsconfig/node20' # required dynamically by TS, used in tsconfig.json
27+
- '@tsconfig/node22' # required dynamically by TS, used in tsconfig.json
2828
- '@sentry/cli' # invoked as `sentry-cli`
2929
- 'chromedriver'
3030
- 'depcheck' # ooo meta

.eslintrc.js

-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ module.exports = {
308308
files: [
309309
'**/__snapshots__/*.snap',
310310
'app/scripts/controllers/app-state-controller.test.ts',
311-
'app/scripts/controllers/mmi-controller.test.ts',
312311
'app/scripts/controllers/alert-controller.test.ts',
313312
'app/scripts/metamask-controller.actions.test.js',
314313
'app/scripts/detect-multiple-instances.test.js',

.github/CODEOWNERS

+7-12
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,13 @@ privacy-snapshot.json @MetaMask/extension-privacy-reviewers
5656
.devcontainer/ @MetaMask/extension-security-team @HowardBraham
5757

5858
# Confirmations team to own code for confirmations on UI.
59-
app/scripts/lib/ppom @MetaMask/confirmations
60-
app/scripts/lib/signature @MetaMask/confirmations
61-
app/scripts/lib/transaction/decode @MetaMask/confirmations
62-
app/scripts/lib/transaction/metrics.* @MetaMask/confirmations
63-
app/scripts/lib/transaction/util.* @MetaMask/confirmations
64-
ui/pages/confirmations @MetaMask/confirmations
65-
66-
# MMI team is responsible for code related with Institutioanl version of MetaMask
67-
ui/pages/institutional @MetaMask/mmi
68-
ui/components/institutional @MetaMask/mmi
69-
ui/ducks/institutional @MetaMask/mmi
70-
ui/selectors/institutional @MetaMask/mmi
59+
app/scripts/controller-init/confirmations @MetaMask/confirmations
60+
app/scripts/lib/ppom @MetaMask/confirmations
61+
app/scripts/lib/signature @MetaMask/confirmations
62+
app/scripts/lib/transaction/decode @MetaMask/confirmations
63+
app/scripts/lib/transaction/metrics.* @MetaMask/confirmations
64+
app/scripts/lib/transaction/util.* @MetaMask/confirmations
65+
ui/pages/confirmations @MetaMask/confirmations
7166

7267
# Design System to own code for the component-library folder
7368
# Slack handle: @metamask-design-system-team | Slack channel: #metamask-design-system

.github/workflows/add-mmi-reviewer-and-notify.yml

-48
This file was deleted.

.github/workflows/publish-prerelease.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ jobs:
2222
- name: Get merge base commit hash
2323
id: get-merge-base
2424
env:
25-
BASE_REF: ${{ github.event.pull_request.base.ref }}
25+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
26+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
2627
run: |
27-
merge_base="$(git merge-base "origin/${BASE_REF}" HEAD)"
28+
merge_base="$(git merge-base "${BASE_SHA}" "${HEAD_SHA}")"
2829
echo "MERGE_BASE=${merge_base}" >> "$GITHUB_OUTPUT"
2930
echo "Merge base is '${merge_base}'"
3031

.github/workflows/trigger-metamask-institutional-e2e-ci.yml

-28
This file was deleted.

.github/workflows/update-lavamoat-policies.yml

+25-9
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
matrix:
9393
# Ensure this is synchronized with the list below in the "commit-updated-policies" job
9494
# and with the build type list in `builds.yml`
95-
build-type: [main, beta, flask, mmi]
95+
build-type: [main, beta, flask]
9696
name: Update LavaMoat ${{ matrix.build-type }} application policy
9797
runs-on: ubuntu-latest
9898
needs:
@@ -154,7 +154,7 @@ jobs:
154154
path: lavamoat/build-system
155155
key: cache-build-${{ needs.prepare.outputs.COMMIT_SHA }}
156156
fail-on-cache-miss: true
157-
# One restore step per build type: [main, beta, flask, mmi]
157+
# One restore step per build type: [main, beta, flask]
158158
# Ensure this is synchronized with the list above in the "update-lavamoat-webapp-policy" job
159159
# and with the build type list in `builds.yml`
160160
- name: Restore main application policy
@@ -175,12 +175,6 @@ jobs:
175175
path: lavamoat/browserify/flask
176176
key: cache-flask-${{ needs.prepare.outputs.COMMIT_SHA }}
177177
fail-on-cache-miss: true
178-
- name: Restore mmi application policy
179-
uses: actions/cache/restore@v4
180-
with:
181-
path: lavamoat/browserify/mmi
182-
key: cache-mmi-${{ needs.prepare.outputs.COMMIT_SHA }}
183-
fail-on-cache-miss: true
184178
- name: Check whether there are policy changes
185179
id: policy-changes
186180
run: |
@@ -197,11 +191,33 @@ jobs:
197191
git config --global user.email '[email protected]'
198192
git commit -am "Update LavaMoat policies"
199193
git push
194+
## Yes, it would be nice to use the local diff before the commit is made, but we need to include potential multiple updates in the history of the PR
195+
- name: Compare policy changes
196+
run: |
197+
if [[ $HAS_CHANGES == 'true' ]]
198+
then
199+
git fetch origin ${{ github.base_ref }}
200+
main_diff=$(git diff origin/${{ github.base_ref }} lavamoat/browserify/main/policy.json | md5sum | cut -d' ' -f1)
201+
for folder in lavamoat/browserify/*/; do
202+
if [ "$folder" != "lavamoat/browserify/main/" ]; then
203+
file="${folder}policy.json"
204+
if [ -f "$file" ]; then
205+
diff=$(git diff origin/${{ github.base_ref }} "$file" | md5sum | cut -d' ' -f1)
206+
if [ "$diff" = "$main_diff" ]; then
207+
echo "✅ ${folder}policy.json changes match main/policy.json policy changes"
208+
else
209+
echo "👀 ${folder}policy.json changes **differ from** main/policy.json policy changes"
210+
fi
211+
fi
212+
fi
213+
done > does_diff_diff.txt
214+
fi
215+
## Note the use of `cat -` to include the file contents and the echo in the comment
200216
- name: Post comment
201217
run: |
202218
if [[ $HAS_CHANGES == 'true' ]]
203219
then
204-
echo -e 'Policies updated. \n👀 Please review the diff for suspicious new powers. \n\n🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff' | gh pr comment "${PR_NUMBER}" --body-file -
220+
echo -e 'Policies updated. \n👀 Please review the diff for suspicious new powers. \n\n🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff \n\n' | cat - does_diff_diff.txt | gh pr comment "${PR_NUMBER}" --body-file -
205221
else
206222
gh pr comment "${PR_NUMBER}" --body 'No policy changes'
207223
fi

.github/workflows/validate-lavamoat-policy-webapp.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
build-type: [main, beta, flask, mmi]
12+
build-type: [main, beta, flask]
1313
steps:
1414
- name: Checkout repository
1515
uses: actions/checkout@v4

.gitignore

+1-5
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,8 @@ test-results/
6767
!.yarn/versions
6868
development/generate-attributions/.yarn/*
6969

70-
# MMI Playwright
70+
# Playwright
7171
public/playwright
72-
test/e2e/playwright/mmi/.env
73-
test/e2e/playwright/mmi/playwright.config.ts
74-
test/e2e/playwright/mmi/specs/**/*-darwin.png
75-
test/e2e/playwright/mmi/dist/
7672
lavamoat/**/policy-debug.json
7773

7874
# Attributions

.metamaskrc.dist

-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ BLOCKAID_PUBLIC_KEY=
3131
; Set this to true to enable the snap path for the Firefox WebDriver (Linux)
3232
; FIREFOX_SNAP=
3333

34-
; Enable the redesigned confirmations still in development, without needing to toggle the developer setting.
35-
; ENABLE_CONFIRMATION_REDESIGN=
36-
3734
; URL of security alerts API used to validate dApp requests
3835
; SECURITY_ALERTS_API_URL='http://localhost:3000'
3936
; Temporary mechanism to enable security alerts API prior to release

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.18
1+
v22.13

.storybook/main.js

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ module.exports = {
3131
staticDirs: ['../app', './images'],
3232
env: (config) => ({
3333
...config,
34-
ENABLE_CONFIRMATION_REDESIGN: true,
3534
INFURA_PROJECT_ID: process.env.INFURA_STORYBOOK_PROJECT_ID || '',
3635
}),
3736
// Uses babel.config.js settings and prevents "Missing class properties transform" error

.yarn/patches/@metamask-assets-controllers-npm-45.1.0-d914c453f0.patch

-59
This file was deleted.

0 commit comments

Comments
 (0)