Skip to content

Commit 9259616

Browse files
authored
Merge branch 'main' into send-tokens-styling
2 parents 2114931 + 6225272 commit 9259616

File tree

7 files changed

+98
-8
lines changed

7 files changed

+98
-8
lines changed

.github/workflows/e2e-chrome.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
workflow_call:
55

66
jobs:
7-
test-e2e-chrome:
7+
test-e2e-chrome-browserify:
88
uses: ./.github/workflows/run-e2e.yml
99
strategy:
1010
fail-fast: false
1111
matrix:
1212
index:
1313
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
1414
with:
15-
test-suite-name: test-e2e-chrome
15+
test-suite-name: test-e2e-chrome-browserify
1616
build-artifact: prep-build-test-browserify-chrome
1717
build-command: yarn build:test
1818
test-command: yarn test:e2e:chrome
@@ -72,7 +72,7 @@ jobs:
7272

7373
test-e2e-chrome-report:
7474
needs:
75-
- test-e2e-chrome
75+
- test-e2e-chrome-browserify
7676
- test-e2e-chrome-webpack
7777
- test-e2e-chrome-multiple-providers
7878
- test-e2e-chrome-rpc

.github/workflows/e2e-firefox.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
workflow_call:
55

66
jobs:
7-
test-e2e-firefox:
7+
test-e2e-firefox-browserify:
88
uses: ./.github/workflows/run-e2e.yml
99
strategy:
1010
fail-fast: false
1111
matrix:
1212
index:
1313
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
1414
with:
15-
test-suite-name: test-e2e-firefox
15+
test-suite-name: test-e2e-firefox-browserify
1616
build-command: yarn build:test:mv2
1717
test-command: yarn test:e2e:firefox
1818
matrix-index: ${{ matrix.index }}
@@ -33,7 +33,7 @@ jobs:
3333

3434
test-e2e-firefox-report:
3535
needs:
36-
- test-e2e-firefox
36+
- test-e2e-firefox-browserify
3737
- test-e2e-firefox-flask
3838
runs-on: ubuntu-latest
3939
if: ${{ !cancelled() }}

.yarnrc.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,14 @@ npmAuditIgnoreAdvisories:
5555
- 1102472
5656

5757
# 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 to unblock CI, we will follow with a proper fix or confirmation this does not affect our users
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
5959
- 1103026
60+
- 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.
65+
- 1103932
6066

6167
# Temp fix for https://github.com/MetaMask/metamask-extension/pull/16920 for the sake of 11.7.1 hotfix
6268
# This will be removed in this ticket https://github.com/MetaMask/metamask-extension/issues/22299

app/scripts/migrations/154.test.ts

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import { migrate, version } from './154';
2+
3+
const oldVersion = 153;
4+
5+
describe(`migration #${version}`, () => {
6+
it('updates the version metadata', async () => {
7+
const oldStorage = {
8+
meta: { version: oldVersion },
9+
data: {},
10+
};
11+
const newStorage = await migrate(oldStorage);
12+
expect(newStorage.meta).toStrictEqual({ version });
13+
});
14+
15+
describe(`migration #${version}`, () => {
16+
it('removes the QueuedRequestController from the state', async () => {
17+
const oldStorage = {
18+
meta: { version: oldVersion },
19+
data: {
20+
QueuedRequestController: {
21+
queuedRequestCount: 0,
22+
},
23+
},
24+
};
25+
const expectedData = {};
26+
const newStorage = await migrate(oldStorage);
27+
28+
expect(newStorage.data).toStrictEqual(expectedData);
29+
});
30+
31+
it('does nothing to other state params', async () => {
32+
const oldStorage = {
33+
meta: { version: oldVersion },
34+
data: {
35+
OtherController: {
36+
someParam: 0,
37+
},
38+
},
39+
};
40+
41+
const expectedData = {
42+
OtherController: {
43+
someParam: 0,
44+
},
45+
};
46+
47+
const newStorage = await migrate(oldStorage);
48+
49+
expect(newStorage.data).toStrictEqual(expectedData);
50+
});
51+
});
52+
});

app/scripts/migrations/154.ts

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { cloneDeep } from 'lodash';
2+
3+
type VersionedData = {
4+
meta: { version: number };
5+
data: Record<string, unknown>;
6+
};
7+
8+
export const version = 154;
9+
10+
/**
11+
* This migration deletes the QueuedRequestController from the state.
12+
*
13+
* @param originalVersionedData - Versioned MetaMask extension state, exactly
14+
* what we persist to dist.
15+
* @param originalVersionedData.meta - State metadata.
16+
* @param originalVersionedData.meta.version - The current state version.
17+
* @param originalVersionedData.data - The persisted MetaMask state, keyed by
18+
* controller.
19+
* @returns Updated versioned MetaMask extension state.
20+
*/
21+
export async function migrate(
22+
originalVersionedData: VersionedData,
23+
): Promise<VersionedData> {
24+
const versionedData = cloneDeep(originalVersionedData);
25+
versionedData.meta.version = version;
26+
transformState(versionedData.data);
27+
return versionedData;
28+
}
29+
30+
function transformState(state: Record<string, unknown>) {
31+
delete state?.QueuedRequestController;
32+
}

app/scripts/migrations/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ const migrations = [
181181
require('./152'),
182182
require('./152.1'),
183183
require('./153'),
184+
require('./154'),
184185
];
185186

186187
export default migrations;

shared/constants/metametrics.ts

-1
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,6 @@ export enum MetaMetricsEventAccountType {
929929

930930
export enum QueueType {
931931
NavigationHeader = 'navigation_header',
932-
QueueController = 'queue_controller',
933932
}
934933

935934
export enum MetaMetricsEventAccountImportType {

0 commit comments

Comments
 (0)