Skip to content

Commit 8318244

Browse files
committed
Merge branch 'main' into mikesposito/chore/update-keyring-controller
2 parents a8bcb85 + d2c6be7 commit 8318244

File tree

178 files changed

+5759
-4112
lines changed

Some content is hidden

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

178 files changed

+5759
-4112
lines changed

.depcheckrc.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ ignores:
4444
- 'wait-on'
4545
- 'tsx' # used in .devcontainer
4646
- 'prettier-eslint' # used by the Prettier ESLint VSCode extension
47-
- 'tar' # used by foundryup.ts
48-
- 'minipass' # used by foundryup.ts
4947
- 'tweetnacl' # used by solana-wallet-standard
5048
- 'bs58' # used by solana-wallet-standard
5149
# storybook

.github/CODEOWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ ui/components/app/metamask-template-renderer @MetaMask/confirmations @MetaMask/s
117117
ui/components/app/whats-new-popup @MetaMask/wallet-ux
118118
ui/css @MetaMask/wallet-ux
119119
ui/pages/home @MetaMask/wallet-ux
120-
ui/pages/onboarding-flow @MetaMask/wallet-ux
120+
121+
# Web3Auth / Onboarding
122+
ui/pages/onboarding-flow @MetaMask/web3auth
121123

122124
# Confirmations team to own code for confirmations on UI.
123125
app/scripts/controller-init/confirmations @MetaMask/confirmations

.github/workflows/cla.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2424
with:
2525
path-to-signatures: 'cla.json'
26-
url-to-cladocument: 'https://metamask.io/cla.html'
26+
url-to-cladocument: 'https://metamask.io/cla'
2727
# This branch can't have protections, commits are made directly to the specified branch.
2828
branch: 'cla-signatures'
2929
allowlist: 'dependabot[bot],metamaskbot,crowdin-bot,runway-github[bot]'

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
- opened
1313
- reopened
1414
- synchronize
15+
branches-ignore:
16+
- master
1517
merge_group:
1618

1719
concurrency:
@@ -328,7 +330,6 @@ jobs:
328330

329331
publish-prerelease:
330332
name: Publish prerelease
331-
if: ${{ github.event_name == 'pull_request' }}
332333
needs:
333334
- build-dist-browserify
334335
- build-dist-mv2-browserify

.github/workflows/publish-prerelease.yml

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ jobs:
1010
publish-prerelease:
1111
name: Publish prerelease
1212
runs-on: ubuntu-latest
13+
env:
14+
PR_COMMENT_TOKEN: ${{ secrets.PR_COMMENT_TOKEN }}
15+
OWNER: ${{ github.repository_owner }}
16+
REPOSITORY: ${{ github.event.repository.name }}
17+
RUN_ID: ${{ github.run_id }}
18+
# For a `pull_request` event, the branch is `github.head_ref`.
19+
# For a `push` event, the branch is `github.ref_name`.
20+
BRANCH: ${{ github.head_ref || github.ref_name }}
21+
PR_NUMBER: ${{ github.event.pull_request.number }}
22+
BASE_COMMIT_HASH: ${{ github.event.pull_request.base.sha }}
23+
HEAD_COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
24+
MERGE_BASE_COMMIT_HASH: '' # placeholder so that we have autocomplete and logs
25+
CLOUDFRONT_REPO_URL: ${{ vars.AWS_CLOUDFRONT_URL }}/${{ github.event.repository.name }}
26+
HOST_URL: ${{ vars.AWS_CLOUDFRONT_URL }}/${{ github.event.repository.name }}/${{ github.run_id }}
1327
steps:
1428
- name: Checkout and setup high risk environment
1529
uses: MetaMask/action-checkout-and-setup@v1
@@ -19,26 +33,33 @@ jobs:
1933
fetch-depth: 0 # This is needed to get merge base to calculate bundle size diff
2034
yarn-custom-url: ${{ vars.YARN_URL }}
2135

36+
- name: Find the associated PR
37+
if: ${{ startsWith(env.BRANCH, 'Version-v') && (!env.PR_NUMBER || !env.BASE_COMMIT_HASH || !env.HEAD_COMMIT_HASH) }}
38+
uses: actions/github-script@v7
39+
with:
40+
script: |
41+
const prs = await github.rest.pulls.list({
42+
owner: context.repo.owner,
43+
repo: context.repo.repo,
44+
head: `${context.repo.owner}:${process.env.BRANCH}`
45+
base: 'master',
46+
});
47+
if (prs.data.length > 0) {
48+
core.exportVariable("PR_NUMBER", prs.data[0].number);
49+
core.exportVariable("BASE_COMMIT_HASH", prs.data[0].base.sha);
50+
core.exportVariable("HEAD_COMMIT_HASH", prs.data[0].head.sha);
51+
core.info(`The pull request number is '${process.env.PR_NUMBER}', the base commit hash is '${process.env.BASE_COMMIT_HASH}', and the head commit hash is '${process.env.HEAD_COMMIT_HASH}'`);
52+
} else {
53+
core.info(`No pull request detected for branch '${process.env.BRANCH}'`);
54+
}
55+
2256
- name: Get merge base commit hash
23-
id: get-merge-base
24-
env:
25-
BASE_SHA: ${{ github.event.pull_request.base.sha }}
26-
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
57+
if: ${{ env.BASE_COMMIT_HASH && env.HEAD_COMMIT_HASH }}
2758
run: |
28-
merge_base="$(git merge-base "${BASE_SHA}" "${HEAD_SHA}")"
29-
echo "MERGE_BASE=${merge_base}" >> "$GITHUB_OUTPUT"
30-
echo "Merge base is '${merge_base}'"
59+
merge_base_commit_hash="$(git merge-base "${BASE_COMMIT_HASH}" "${HEAD_COMMIT_HASH}")"
60+
echo "MERGE_BASE_COMMIT_HASH=${merge_base_commit_hash}" >> "${GITHUB_ENV}"
61+
echo "The merge base commit hash is '${merge_base_commit_hash}'"
3162
3263
- name: Publish prerelease
33-
if: ${{ env.PR_COMMENT_TOKEN && vars.AWS_CLOUDFRONT_URL }}
34-
env:
35-
PR_COMMENT_TOKEN: ${{ secrets.PR_COMMENT_TOKEN }}
36-
OWNER: ${{ github.repository_owner }}
37-
REPOSITORY: ${{ github.event.repository.name }}
38-
RUN_ID: ${{ github.run_id }}
39-
PR_NUMBER: ${{ github.event.pull_request.number }}
40-
HEAD_COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
41-
MERGE_BASE_COMMIT_HASH: ${{ steps.get-merge-base.outputs.MERGE_BASE }}
42-
CLOUDFRONT_REPO_URL: ${{ vars.AWS_CLOUDFRONT_URL }}/${{ github.event.repository.name }}
43-
HOST_URL: ${{ vars.AWS_CLOUDFRONT_URL }}/${{ github.event.repository.name }}/${{ github.run_id }}
64+
if: ${{ env.MERGE_BASE_COMMIT_HASH && env.PR_NUMBER && env.PR_COMMENT_TOKEN && vars.AWS_CLOUDFRONT_URL }}
4465
run: yarn tsx ./development/metamaskbot-build-announce.ts

.github/workflows/run-benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
# not installed by checkout-and-setup when cache is restored
3535
- name: Install anvil
36-
run: yarn foundryup
36+
run: yarn mm-foundryup
3737

3838
- name: Download artifact '${{ env.ARTIFACT_NAME }}'
3939
uses: actions/download-artifact@v4

.github/workflows/run-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969

7070
# not installed by checkout-and-setup when cache is restored
7171
- name: Install anvil
72-
run: yarn foundryup
72+
run: yarn mm-foundryup
7373

7474
- name: Download build artifact
7575
if: ${{ inputs.build-artifact != '' }}

.yarnrc.yml

Lines changed: 22 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -13,150 +13,48 @@ logFilters:
1313
nodeLinker: node-modules
1414

1515
npmAuditIgnoreAdvisories:
16-
### Advisories:
17-
18-
# Issue: yargs-parser Vulnerable to Prototype Pollution
19-
# URL - https://github.com/advisories/GHSA-p9pc-299p-vxgp
20-
# The affected version (<5.0.0) is only included via @ensdomains/ens via
21-
# 'solc' which is not used in the imports we use from this package.
2216
- 1088783
23-
24-
# Issue: protobufjs Prototype Pollution vulnerability
25-
# URL - https://github.com/advisories/GHSA-h755-8qp9-cq85
26-
# Not easily patched. Minimally effects the extension due to usage of
27-
# LavaMoat lockdown. Additional id added that resolves to the same advisory
28-
# but has a different entry due to it being a new dependency of
29-
# @trezor/connect-web. Upgrading
3017
- 1092429
3118
- 1095136
32-
33-
# Issue: Regular Expression Denial of Service (ReDOS)
34-
# URL: https://github.com/advisories/GHSA-257v-vj4p-3w2h
35-
# color-string is listed as a dependency of 'color' which is brought in by
36-
# @metamask/jazzicon v2.0.0 but there is work done on that repository to
37-
# remove the color dependency. We should upgrade
3819
- 1089718
39-
40-
# Issue: semver vulnerable to Regular Expression Denial of Service
41-
# URL: https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
42-
# semver is used in the solidity compiler portion of @truffle/codec that does
43-
# not appear to be used.
4420
- 1092461
45-
46-
# Issue: Malware in @solana/web3.js
47-
# URL: https://github.com/advisories/GHSA-2mhj-xmf4-pr8m
48-
# we patched this to ensure the vulnerable versions are not included, but the advisory
49-
# was mistakenly originally created to flag all versions as vulnerable
5021
- 1101059
51-
52-
# Issue: axios Requests Vulnerable To Possible SSRF and Credential Leakage via Absolute URL
53-
# URL: https://github.com/advisories/GHSA-jr5f-v2jv-69x6
54-
# We are ignoring this on March 11, 2025 to unblock CI, we will follow with a proper fix or confirmation this does not affect our users
5522
- 1102472
56-
57-
# Issue: Issue: Babel has inefficient RexExp complexity in generated code with .replace when transpiling named capturing groups
58-
# We are ignoring this on March 12, 2025 and April 24, 2025 to unblock CI, we will follow with a proper fix or confirmation this does not affect our users
5923
- 1103026
6024
- 1104001
61-
62-
# Issue: ses's global contour bindings leak into Compartment lexical scope
63-
# URL: https://github.com/advisories/GHSA-h9w6-f932-gq62
64-
# We are ignoring this on April 24, 2025 as it does not affect the codebase.
6525
- 1103932
66-
67-
# Issue: React Router allows pre-render data spoofing on React-Router framework mode
68-
# URL: https://github.com/MetaMask/metamask-extension/security/dependabot/228
69-
# will be fixed in https://github.com/MetaMask/MetaMask-planning/issues/3261
7026
- 1104031
7127
- 1104032
72-
73-
# Temp fix for https://github.com/MetaMask/metamask-extension/pull/16920 for the sake of 11.7.1 hotfix
74-
# This will be removed in this ticket https://github.com/MetaMask/metamask-extension/issues/22299
75-
- 'ts-custom-error (deprecation)'
76-
- 'text-encoding (deprecation)'
77-
78-
### Package Deprecations:
79-
80-
# React-tippy brings in popper.js and react-tippy has not been updated in
81-
# three years.
82-
- 'popper.js (deprecation)'
83-
84-
# React-router is out of date and brings in the following deprecated package
85-
- 'mini-create-react-context (deprecation)'
86-
87-
# The affected version, which is less than 7.0.0, is brought in by
88-
# ethereumjs-wallet version 0.6.5 used in the extension but only in a single
89-
# file app/scripts/account-import-strategies/index.js, which may be easy to
90-
# upgrade.
91-
- 'uuid (deprecation)'
92-
93-
# @npmcli/move-file is brought in via CopyWebpackPlugin used in the storybook
94-
# main.js file, which can be upgraded to remove this dependency in favor of
95-
# @npmcli/fs
28+
- ts-custom-error (deprecation)
29+
- text-encoding (deprecation)
30+
- popper.js (deprecation)
31+
- mini-create-react-context (deprecation)
32+
- uuid (deprecation)
9633
- '@npmcli/move-file (deprecation)'
97-
98-
# Upgrading babel will result in the following deprecated packages being
99-
# updated:
100-
- 'core-js (deprecation)'
101-
102-
# Material UI dependencies are planned for removal
34+
- core-js (deprecation)
10335
- '@material-ui/core (deprecation)'
10436
- '@material-ui/styles (deprecation)'
10537
- '@material-ui/system (deprecation)'
106-
107-
# @ensdomains/ens should be explored for upgrade. The following packages are
108-
# deprecated and would be resolved by upgrading to newer versions of
109-
# ensdomains packages:
11038
- '@ensdomains/ens (deprecation)'
11139
- '@ensdomains/resolver (deprecation)'
112-
- 'testrpc (deprecation)'
113-
114-
# Dependencies brought in by @truffle/decoder that are deprecated:
115-
- 'cids (deprecation)' # via @ensdomains/content-hash
116-
- 'multibase (deprecation)' # via cids
117-
- 'multicodec (deprecation)' # via cids
118-
119-
# MetaMask owned repositories brought in by other MetaMask dependencies that
120-
# can be resolved by updating the versions throughout the dependency tree
121-
- 'eth-sig-util (deprecation)' # via @metamask/eth-ledger-bridge-keyring
122-
- '@metamask/controller-utils (deprecation)' # via @metamask/phishing-controller
123-
- 'safe-event-emitter (deprecation)' # via eth-block-tracker and others
124-
125-
# @metamask-institutional relies upon crypto which is deprecated
126-
- 'crypto (deprecation)'
127-
128-
# @metamask/providers uses webextension-polyfill-ts which has been moved to
129-
# @types/webextension-polyfill
130-
- 'webextension-polyfill-ts (deprecation)'
131-
132-
# Imported in @trezor/blockchain-link@npm:2.1.8, but not actually depended on
133-
# by MetaMask
134-
- 'ripple-lib (deprecation)'
135-
136-
# Brought in by ethereumjs-utils, which is used in the extension and in many
137-
# other dependencies. At the time of this exclusion, the extension has three
138-
# old versions of ethereumjs-utils which should be upgraded to
139-
# @ethereumjs/utils throughout our owned repositories. However even doing
140-
# that may be insufficient due to dependencies we do not own still relying
141-
# upon old versions of ethereumjs-utils.
142-
- 'ethereum-cryptography (deprecation)'
143-
144-
# Currently in use for the network list drag and drop functionality.
145-
# Maintenance has stopped and the project will be archived in 2025.
146-
- 'react-beautiful-dnd (deprecation)'
147-
# New package name format for new versions: @ethereumjs/wallet.
148-
- 'ethereumjs-wallet (deprecation)'
149-
150-
# The new trezor version breaks the webpack build due to issues with ESM and CommonJS
151-
# Leading to this error on start: `Uncaught ReferenceError: exports is not defined`
152-
# We temporarily ignore the audit failure until we can safely upgrade to the new version without breaking the webpack build
153-
# Check Trezor 9.5.X Changelog for more info: https://github.com/trezor/trezor-suite/blob/develop/packages/connect/CHANGELOG.md
40+
- testrpc (deprecation)
41+
- cids (deprecation)
42+
- multibase (deprecation)
43+
- multicodec (deprecation)
44+
- eth-sig-util (deprecation)
45+
- '@metamask/controller-utils (deprecation)'
46+
- safe-event-emitter (deprecation)
47+
- crypto (deprecation)
48+
- webextension-polyfill-ts (deprecation)
49+
- ripple-lib (deprecation)
50+
- ethereum-cryptography (deprecation)
51+
- react-beautiful-dnd (deprecation)
52+
- ethereumjs-wallet (deprecation)
15453
- '@trezor/connect-web (deprecation)'
155-
156-
# We temporarily ignore the deprecation notice to unblock ci
157-
# Issue: @solana/web3.js version 2.0 is now @solana/kit! Remove @solana/web3.js@2 from your dependencies and replace it with @solana/kit.
158-
# As needed, upgrade all of your @solana-program/* dependencies to the latest versions that use Kit.
15954
- '@solana/web3.js (deprecation)'
55+
56+
npmRegistryServer: 'https://registry.npmjs.org/'
57+
16058
plugins:
16159
- path: .yarn/plugins/@yarnpkg/plugin-allow-scripts.cjs
16260
spec: 'https://raw.githubusercontent.com/LavaMoat/LavaMoat/main/packages/yarn-plugin-allow-scripts/bundles/@yarnpkg/plugin-allow-scripts.js'

app/_locales/am/messages.json

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

0 commit comments

Comments
 (0)