Skip to content

Commit 7dd1133

Browse files
authored
Merge branch 'main' into chore/remove-supported-chainIds-static-array
2 parents 32a0515 + 4b6fb71 commit 7dd1133

File tree

178 files changed

+8084
-1582
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

+8084
-1582
lines changed

.github/workflows/run-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
runs-on: ubuntu-latest
4848
timeout-minutes: 30
4949
container:
50-
image: ghcr.io/metamask/metamask-extension-e2e-image:v1.0.0
50+
image: ghcr.io/metamask/metamask-extension-e2e-image:v24.11.0
5151
credentials:
5252
username: ${{ github.actor }}
5353
password: ${{ secrets.GITHUB_TOKEN }}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v22.15
1+
v24.11

.yarn/yarn-corepack.tgz

3.02 KB
Binary file not shown.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ If you are not a MetaMask Internal Developer, or are otherwise developing on a f
4747

4848
## Building on your local machine
4949

50-
- Install [Node.js](https://nodejs.org) version 22
50+
- Install [Node.js](https://nodejs.org) version 24
5151
- If you are using [nvm](https://github.com/nvm-sh/nvm#installing-and-updating) (recommended) running `nvm use` will automatically choose the right node version for you.
5252
- Enable Corepack by executing the command `corepack enable` within the metamask-extension project. Corepack is a utility included with Node.js by default. It manages Yarn on a per-project basis, using the version specified by the `packageManager` property in the project's package.json file. Please note that modern releases of [Yarn](https://yarnpkg.com/getting-started/install) are not intended to be installed globally or via npm.
5353
- Duplicate `.metamaskrc.dist` within the root and rename it to `.metamaskrc` by running `cp .metamaskrc{.dist,}`.

app/_locales/en/messages.json

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

app/_locales/en_GB/messages.json

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

app/scripts/background.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,12 @@ function maybeDetectPhishing(theController) {
339339
}
340340

341341
const { hostname, href, searchParams } = new URL(details.url);
342-
if (inTest) {
343-
if (searchParams.has('IN_TEST_BYPASS_EARLY_PHISHING_DETECTION')) {
344-
// this is a test page that needs to bypass early phishing detection
345-
return {};
346-
}
342+
if (
343+
inTest &&
344+
searchParams.has('IN_TEST_BYPASS_EARLY_PHISHING_DETECTION')
345+
) {
346+
// this is a test page that needs to bypass early phishing detection
347+
return {};
347348
}
348349

349350
theController.phishingController.maybeUpdateState();

app/scripts/constants/sentry-state.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -396,14 +396,11 @@ export const SENTRY_BACKGROUND_STATE = {
396396
},
397397
};
398398

399-
const flattenedBackgroundStateMask = Object.values(
400-
SENTRY_BACKGROUND_STATE,
401-
).reduce((partialBackgroundState, controllerState: object) => {
402-
return {
403-
...partialBackgroundState,
404-
...controllerState,
405-
};
406-
}, {});
399+
const flattenedBackgroundStateMask: Record<string, unknown> = {};
400+
401+
for (const controllerState of Object.values(SENTRY_BACKGROUND_STATE)) {
402+
Object.assign(flattenedBackgroundStateMask, controllerState);
403+
}
407404

408405
// This describes the subset of Redux state attached to errors sent to Sentry
409406
// These properties have some potential to be useful for debugging, and they do

app/scripts/controller-init/assets/network-enablement-controller-init.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ export const NetworkEnablementControllerInit: ControllerInitFunction<
187187
);
188188
///: END:ONLY_INCLUDE_IF
189189

190-
const allEnabledNetworks = Object.values(
191-
controller.state.enabledNetworkMap,
192-
).reduce((acc, curr) => {
193-
return { ...acc, ...curr };
194-
}, {});
190+
const allEnabledNetworks = {};
191+
192+
for (const network of Object.values(controller.state.enabledNetworkMap)) {
193+
Object.assign(allEnabledNetworks, network);
194+
}
195195

196196
if (Object.keys(allEnabledNetworks).length === 1) {
197197
const chainId = Object.keys(allEnabledNetworks)[0];

0 commit comments

Comments
 (0)