Skip to content

Commit a9b0742

Browse files
committed
Merge origin/main into stable-main-13.36.0
2 parents edc611c + b7b3d59 commit a9b0742

886 files changed

Lines changed: 33784 additions & 15925 deletions

File tree

Some content is hidden

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

.eslintrc.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,6 @@ module.exports = {
609609
'app/scripts/lockdown-run.js',
610610
'app/scripts/lockdown-more.js',
611611
'test/helpers/protect-intrinsics-helpers.js',
612-
'test/unit-global/protect-intrinsics.test.js',
613612
],
614613
globals: {
615614
harden: 'readonly',
@@ -830,7 +829,6 @@ module.exports = {
830829
'test/e2e/page-objects/pages/debug-page.ts',
831830
'test/e2e/page-objects/pages/deep-link-page.ts',
832831
'test/e2e/page-objects/pages/defi-details-page.ts',
833-
'test/e2e/page-objects/pages/defi-tab.ts',
834832
'test/e2e/page-objects/pages/dialog/account-details-modal.ts',
835833
'test/e2e/page-objects/pages/dialog/add-edit-network.ts',
836834
'test/e2e/page-objects/pages/dialog/add-network-rpc-url.ts',
@@ -854,10 +852,12 @@ module.exports = {
854852
'test/e2e/page-objects/pages/hardware-wallet/connect-hardware-wallet-page.ts',
855853
'test/e2e/page-objects/pages/hardware-wallet/select-hardware-wallet-account-page.ts',
856854
'test/e2e/page-objects/pages/header-navbar.ts',
857-
'test/e2e/page-objects/pages/home/activity-list.ts',
858-
'test/e2e/page-objects/pages/home/asset-list.ts',
855+
'test/e2e/page-objects/pages/home/activity-tab.ts',
856+
'test/e2e/page-objects/pages/home/defi-tab.ts',
859857
'test/e2e/page-objects/pages/home/homepage.ts',
860-
'test/e2e/page-objects/pages/home/nft-list.ts',
858+
'test/e2e/page-objects/pages/home/nfts-tab.ts',
859+
'test/e2e/page-objects/pages/home/perps-tab.ts',
860+
'test/e2e/page-objects/pages/home/tokens-tab.ts',
861861
'test/e2e/page-objects/pages/home/transaction-details.ts',
862862
'test/e2e/page-objects/pages/login-page.ts',
863863
'test/e2e/page-objects/pages/multichain/account-address-modal.ts',
@@ -880,7 +880,6 @@ module.exports = {
880880
'test/e2e/page-objects/pages/permission/permission-list-page.ts',
881881
'test/e2e/page-objects/pages/permission/site-permission-page.ts',
882882
'test/e2e/page-objects/pages/perps/perps-activity-page.ts',
883-
'test/e2e/page-objects/pages/perps/perps-home-page.ts',
884883
'test/e2e/page-objects/pages/perps/perps-market-detail-page.ts',
885884
'test/e2e/page-objects/pages/perps/perps-market-list-page.ts',
886885
'test/e2e/page-objects/pages/perps/perps-order-entry-page.ts',

.github/CODEOWNERS

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,24 @@ test/e2e/tests/perps/ @MetaMask/perps
9999
docs/perps/ @MetaMask/perps
100100
**/perps/** @MetaMask/perps
101101

102-
# Snaps
103-
**/snaps/** @MetaMask/core-platform
104-
shared/constants/permissions.ts @MetaMask/core-platform
105-
ui/helpers/utils/permission.js @MetaMask/core-platform
106-
app/scripts/constants/snaps.ts @MetaMask/core-platform
102+
# Core Platform
103+
**/snaps/** @MetaMask/core-platform
104+
shared/constants/permissions.ts @MetaMask/core-platform
105+
ui/helpers/utils/permission.js @MetaMask/core-platform
106+
app/scripts/constants/snaps.ts @MetaMask/core-platform
107+
app/scripts/services/legacy-background-api-service.ts @MetaMask/core-platform
108+
app/scripts/services/legacy-background-api-service.test.ts @MetaMask/core-platform
109+
107110

108111
# Co-owned by Confirmations and Snaps
109112
ui/components/app/metamask-template-renderer @MetaMask/confirmations @MetaMask/core-platform
110113

111114
# Core Extension UX
112115
ui/components/app/whats-new-popup @MetaMask/core-extension-ux
113116
ui/css @MetaMask/core-extension-ux
117+
shared/lib/activity @MetaMask/core-extension-ux
114118
ui/pages/home @MetaMask/core-extension-ux
119+
ui/pages/activity @MetaMask/core-extension-ux
115120
ui/pages/core @MetaMask/core-extension-ux
116121
ui/pages/permissions-connect/ @MetaMask/core-extension-ux
117122
ui/pages/settings @MetaMask/core-extension-ux
@@ -196,21 +201,21 @@ test/e2e/benchmarks/utils/gated-metrics.ts @MetaMask/
196201
test/e2e/benchmarks/utils/thresholds.ts @MetaMask/qa @MetaMask/extension-platform
197202

198203
# Wallet Integrations
199-
app/scripts/lib/rpc-method-middleware @MetaMask/wallet-integrations
200-
shared/lib/caip25-caveat-merger.ts @MetaMask/wallet-integrations
201-
test/e2e/page-objects/benchmark @MetaMask/wallet-integrations
202-
test/e2e/playwright/benchmark @MetaMask/wallet-integrations
203-
test/e2e/flask/multichain-api @MetaMask/wallet-integrations
204+
test/e2e/page-objects/benchmark @MetaMask/core-platform
205+
test/e2e/playwright/benchmark @MetaMask/core-platform
206+
app/scripts/lib/createDefiReferralMiddleware.ts @MetaMask/core-platform
207+
app/scripts/lib/rpc-method-middleware @MetaMask/core-platform
208+
shared/lib/caip25-caveat-merger.ts @MetaMask/core-platform
209+
test/e2e/flask/multichain-api @MetaMask/core-platform
204210
# TODO CONSOLIDATE THE MIDDLEWARE BELOW INTO THE RPC-METHOD-MIDDLEWARE FOLDER
205-
app/scripts/lib/createRPCMethodTrackingMiddleware.js @MetaMask/wallet-integrations
206-
app/scripts/lib/createMetamaskMiddleware.ts @MetaMask/wallet-integrations
207-
app/scripts/lib/createOnboardingMiddleware.js @MetaMask/wallet-integrations
208-
app/scripts/lib/createEvmMethodsToNonEvmAccountReqFilterMiddleware.ts @MetaMask/wallet-integrations
209-
app/scripts/lib/createDefiReferralMiddleware.ts @MetaMask/wallet-integrations
210-
app/scripts/lib/middleware/ @MetaMask/wallet-integrations
211-
app/scripts/lib/createOriginThrottlingMiddleware.ts @MetaMask/wallet-integrations
212-
app/scripts/lib/createMainFrameOriginMiddleware.ts @MetaMask/wallet-integrations
213-
app/scripts/lib/createTracingMiddleware.ts @MetaMask/wallet-integrations
211+
app/scripts/lib/createRPCMethodTrackingMiddleware.js @MetaMask/core-platform
212+
app/scripts/lib/createMetamaskMiddleware.ts @MetaMask/core-platform
213+
app/scripts/lib/createOnboardingMiddleware.js @MetaMask/core-platform
214+
app/scripts/lib/createEvmMethodsToNonEvmAccountReqFilterMiddleware.ts @MetaMask/core-platform
215+
app/scripts/lib/middleware/ @MetaMask/core-platform
216+
app/scripts/lib/createOriginThrottlingMiddleware.ts @MetaMask/core-platform
217+
app/scripts/lib/createMainFrameOriginMiddleware.ts @MetaMask/core-platform
218+
app/scripts/lib/createTracingMiddleware.ts @MetaMask/core-platform
214219

215220
# mUSD
216221
**/musd/** @MetaMask/earn
@@ -270,3 +275,8 @@ app/scripts/lib/metaRPCClientFactory.ts @MetaMask/extension-platfor
270275
ui/hooks/gator-permissions @MetaMask/delegation
271276
app/scripts/messenger-client-init/gator-permissions @MetaMask/delegation
272277
shared/lib/gator-permissions @MetaMask/delegation
278+
279+
# Snapshots – no code owners assigned
280+
# This allows anyone with write access to approve changes to any *.snap files.
281+
# ⚠️ Note: Leaving this rule unassigned disables Code Owner review enforcement for snapshot files.
282+
**/*.snap

.github/scripts/bundle-stats-commit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ git config --global user.name "MetaMask Bot"
2727

2828
git clone --depth 1 https://github.com/MetaMask/extension_bundlesize_stats.git temp
2929

30-
BUNDLE_SIZE_FILE="test-artifacts/chrome/bundle_size_stats.json"
30+
BUNDLE_SIZE_FILE="test-artifacts/chrome/chrome.json"
3131
STATS_FILE="temp/stats/bundle_size_data.json"
3232
TEMP_FILE="temp/stats/bundle_size_data.temp.json"
3333

.github/workflows/e2e-chrome.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ on:
1515
type: string
1616
description: The matrix for the E2E jobs
1717
secrets:
18-
PR_COMMENT_TOKEN:
19-
required: false
2018
INFURA_PROJECT_ID:
2119
required: false
2220

.github/workflows/main.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ jobs:
446446
bundle-size:
447447
needs:
448448
- get-requirements
449-
- build-dist-browserify
449+
- build-dist-webpack
450450
if: ${{ needs.get-requirements.outputs.skip-everything != 'true' && needs.get-requirements.outputs.builds-from-run == github.run_id }}
451451
runs-on: ubuntu-latest
452452
timeout-minutes: 30
@@ -461,15 +461,15 @@ jobs:
461461
is-high-risk-environment: false
462462
skip-allow-scripts: true
463463

464-
- name: Download artifact 'build-dist-browserify'
464+
- name: Download artifact 'build-dist-webpack'
465465
uses: actions/download-artifact@v7
466466
with:
467-
name: build-dist-browserify
467+
name: build-dist-webpack
468468
github-token: ${{ secrets.GITHUB_TOKEN }} # This is required when downloading artifacts from a different repository or from a different workflow run.
469469
run-id: ${{ needs.get-requirements.outputs.builds-from-run }} # Download from the run that produced the builds.
470470

471-
- name: Measure bundle size
472-
run: yarn tsx test/e2e/mv3-perf-stats/bundle-size.ts --out test-artifacts/chrome
471+
- name: Copy bundle size summary
472+
run: mkdir -p test-artifacts && mv dist/bundle-size test-artifacts/chrome
473473

474474
- name: Record bundle size at commit
475475
# Skip on fork repos — only record stats on the canonical repository.
@@ -617,7 +617,6 @@ jobs:
617617
builds-from-run: ${{ needs.get-requirements.outputs.builds-from-run }}
618618
builds-from-sha: ${{ needs.get-requirements.outputs.builds-from-sha }}
619619
secrets:
620-
PR_COMMENT_TOKEN: ${{ secrets.PR_COMMENT_TOKEN }}
621620
E2E_OPENAI_API_KEY: ${{ secrets.E2E_OPENAI_API_KEY }}
622621
E2E_CLAUDE_API_KEY: ${{ secrets.E2E_CLAUDE_API_KEY }}
623622
E2E_GEMINI_API_KEY: ${{ secrets.E2E_GEMINI_API_KEY }}

.github/workflows/publish-prerelease.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: Publish prerelease
33
on:
44
workflow_call:
55
secrets:
6-
PR_COMMENT_TOKEN:
7-
required: true
86
E2E_OPENAI_API_KEY:
97
required: false
108
E2E_CLAUDE_API_KEY:
@@ -109,8 +107,10 @@ jobs:
109107
runs-on: ubuntu-latest
110108
timeout-minutes: 30
111109
environment: pr-comment
110+
permissions:
111+
contents: read
112+
id-token: write
112113
env:
113-
PR_COMMENT_TOKEN: ${{ secrets.PR_COMMENT_TOKEN }}
114114
OWNER: ${{ github.repository_owner }}
115115
REPOSITORY: ${{ github.event.repository.name }}
116116
RUN_ID: ${{ github.run_id }}
@@ -188,6 +188,17 @@ jobs:
188188
echo "EOF"
189189
} >> "${GITHUB_ENV}"
190190
191+
- name: Get token
192+
id: token
193+
if: ${{ env.PR_NUMBER && vars.AWS_CLOUDFRONT_URL }}
194+
uses: MetaMask/github-tools/.github/actions/get-token@v1
195+
with:
196+
token-exchange-url: ${{ vars.TOKEN_EXCHANGE_URL }}
197+
permissions: |
198+
pull_requests: write
199+
191200
- name: Publish prerelease
192-
if: ${{ env.PR_NUMBER && env.PR_COMMENT_TOKEN && vars.AWS_CLOUDFRONT_URL }}
201+
if: ${{ env.PR_NUMBER && steps.token.outputs.token && vars.AWS_CLOUDFRONT_URL }}
202+
env:
203+
PR_COMMENT_TOKEN: ${{ steps.token.outputs.token }}
193204
run: yarn tsx ./development/metamaskbot-build-announce/index.ts

.storybook/i18n.js

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Component, useMemo } from 'react';
1+
import React, { useMemo } from 'react';
22
import PropTypes from 'prop-types';
33
import { getMessage } from '../ui/helpers/utils/i18n-helper';
44
import { I18nContext } from '../ui/contexts/i18n';
@@ -29,29 +29,3 @@ I18nProvider.propTypes = {
2929
I18nProvider.defaultProps = {
3030
children: undefined,
3131
};
32-
33-
export class LegacyI18nProvider extends Component {
34-
static propTypes = {
35-
children: PropTypes.node,
36-
};
37-
38-
static defaultProps = {
39-
children: undefined,
40-
};
41-
42-
static contextType = I18nContext;
43-
44-
static childContextTypes = {
45-
t: PropTypes.func,
46-
};
47-
48-
getChildContext() {
49-
return {
50-
t: this.context,
51-
};
52-
}
53-
54-
render() {
55-
return this.props.children;
56-
}
57-
}

.storybook/metametrics.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
import React from 'react';
2-
import {
3-
MetaMetricsProvider,
4-
LegacyMetaMetricsProvider
5-
} from '../ui/contexts/metametrics';
2+
import { MetaMetricsProvider } from '../ui/contexts/metametrics';
63

7-
const MetaMetricsProviderStorybook = (props) =>
8-
(
9-
<MetaMetricsProvider>
10-
<LegacyMetaMetricsProvider>
11-
{props.children}
12-
</LegacyMetaMetricsProvider>
13-
</MetaMetricsProvider>
14-
);
4+
const MetaMetricsProviderStorybook = (props) => (
5+
<MetaMetricsProvider>{props.children}</MetaMetricsProvider>
6+
);
157

16-
export default MetaMetricsProviderStorybook
8+
export default MetaMetricsProviderStorybook;

.storybook/preview.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import configureStore from '../ui/store/store';
99
import '../ui/css/index.scss';
1010
import localeList from '../app/_locales/index.json';
1111
import * as allLocales from './locales';
12-
import { I18nProvider, LegacyI18nProvider } from './i18n';
12+
import { I18nProvider } from './i18n';
1313
import testData from './test-data.js';
1414
import { MemoryRouter, Routes, Route } from 'react-router-dom';
1515
import { setBackgroundConnection } from '../ui/store/background-connection';
@@ -142,11 +142,9 @@ const metamaskDecorator = (story, context) => {
142142
current={current}
143143
en={allLocales.en}
144144
>
145-
<LegacyI18nProvider>
146-
<Routes>
147-
<Route path={path} element={<StoryComponent />} />
148-
</Routes>
149-
</LegacyI18nProvider>
145+
<Routes>
146+
<Route path={path} element={<StoryComponent />} />
147+
</Routes>
150148
</I18nProvider>
151149
</AlertMetricsProvider>
152150
</MemoryRouter>

.yarnrc.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ npmAuditIgnoreAdvisories:
4545
# three years.
4646
- 'popper.js (deprecation)'
4747

48-
# Material UI dependencies are planned for removal
49-
- '@material-ui/core (deprecation)'
50-
- '@material-ui/styles (deprecation)'
51-
- '@material-ui/pickers (deprecation)'
52-
5348
# Dependencies brought in by @truffle/decoder that are deprecated:
5449
- 'cids (deprecation)' # via @ensdomains/content-hash
5550
- 'multibase (deprecation)' # via cids

0 commit comments

Comments
 (0)