Skip to content

Commit 29d8173

Browse files
authored
Merge branch 'main' into feat/plan-836-ledger-hid-prompt-up-issue
2 parents 064f3c3 + 9fc6544 commit 29d8173

File tree

116 files changed

+7212
-1271
lines changed

Some content is hidden

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

116 files changed

+7212
-1271
lines changed

.circleci/config.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ workflows:
159159
requires:
160160
- prep-build-test
161161
- get-changed-files-with-git-diff
162+
- test-api-specs-multichain:
163+
requires:
164+
- prep-build-test-flask
165+
- get-changed-files-with-git-diff
162166
- test-e2e-chrome-multiple-providers:
163167
requires:
164168
- prep-build-test
@@ -703,6 +707,37 @@ jobs:
703707
- store_test_results:
704708
path: test/test-results/e2e
705709

710+
test-api-specs-multichain:
711+
executor: node-browsers-medium-plus
712+
steps:
713+
- run: *shallow-git-clone-and-enable-vnc
714+
- run: sudo corepack enable
715+
- attach_workspace:
716+
at: .
717+
- run:
718+
name: Move test build to dist
719+
command: mv ./dist-test-flask ./dist
720+
- run:
721+
name: Move test zips to builds
722+
command: mv ./builds-test-flask ./builds
723+
- gh/install
724+
- run:
725+
name: test:api-specs-multichain
726+
command: .circleci/scripts/test-run-e2e.sh yarn test:api-specs-multichain
727+
no_output_timeout: 5m
728+
- run:
729+
name: Comment on PR
730+
command: |
731+
if [ -f html-report-multichain/index.html ]; then
732+
gh pr comment "${CIRCLE_PR_NUMBER}" --body ":x: Multichain API Spec Test Failed. View the report [here](https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/${CIRCLE_NODE_INDEX}/html-report-multichain/index.html)."
733+
else
734+
echo "Multichain API Spec Report not found!"
735+
fi
736+
when: on_fail
737+
- store_artifacts:
738+
path: html-report-multichain
739+
destination: html-report-multichain
740+
706741
test-api-specs:
707742
executor: node-browsers-medium-plus
708743
steps:

.depcheckrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ ignores:
2323
- '@metamask/forwarder'
2424
- '@metamask/phishing-warning' # statically hosted as part of some e2e tests
2525
- '@metamask/test-dapp'
26+
- '@metamask/test-dapp-multichain'
2627
- '@metamask/design-tokens' # Only imported in index.css
2728
- '@tsconfig/node22' # required dynamically by TS, used in tsconfig.json
2829
- '@sentry/cli' # invoked as `sentry-cli`
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Get release timelines
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
required: true
8+
type: string
9+
description: 'The version of the release'
10+
11+
jobs:
12+
get-release-timelines:
13+
uses: metamask/github-tools/.github/workflows/get-release-timelines.yml@3e0b0204e41b576263b9060945de3b3b9b8c5448
14+
with:
15+
version: ${{ github.event.inputs.version }}
16+
secrets:
17+
RUNWAY_APP_ID: ''
18+
RUNWAY_API_KEY: ''

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,13 @@ lavamoat/**/policy-debug.json
8080
# Attributions
8181
licenseInfos.json
8282

83+
# Branding
84+
/app/images/branding
85+
8386
# API Spec tests
8487
html-report/
88+
html-report-multichain/
8589

86-
/app/images/branding
8790
/changed-files
8891

8992
# UI Integration tests
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
diff --git a/dist/cjs/util.js b/dist/cjs/util.js
2+
index d60cf924ee8144ee49dd07e8e910d87a2c4bfb6a..ea5494530c05f4c831e301b88fef7855c89f2885 100644
3+
--- a/dist/cjs/util.js
4+
+++ b/dist/cjs/util.js
5+
@@ -119,14 +119,11 @@ class AuthorizationLists {
6+
}
7+
const chainId = (0, util_1.hexToBytes)(item.chainId);
8+
const addressBytes = (0, util_1.hexToBytes)(item.address);
9+
- const nonceList = [];
10+
- for (let j = 0; j < item.nonce.length; j++) {
11+
- nonceList.push((0, util_1.hexToBytes)(item.nonce[j]));
12+
- }
13+
+ const nonce = (0, util_1.hexToBytes)(item.nonce);
14+
const yParity = (0, util_1.hexToBytes)(item.yParity);
15+
const r = (0, util_1.hexToBytes)(item.r);
16+
const s = (0, util_1.hexToBytes)(item.s);
17+
- newAuthorizationList.push([chainId, addressBytes, nonceList, yParity, r, s]);
18+
+ newAuthorizationList.push([chainId, addressBytes, nonce, yParity, r, s]);
19+
}
20+
bufferAuthorizationList = newAuthorizationList;
21+
}
22+
@@ -138,18 +135,14 @@ class AuthorizationLists {
23+
const data = bufferAuthorizationList[i];
24+
const chainId = (0, util_1.bytesToHex)(data[0]);
25+
const address = (0, util_1.bytesToHex)(data[1]);
26+
- const nonces = data[2];
27+
- const nonceList = [];
28+
- for (let j = 0; j < nonces.length; j++) {
29+
- nonceList.push((0, util_1.bytesToHex)(nonces[j]));
30+
- }
31+
+ const nonce = (0, util_1.bytesToHex)(data[2]);
32+
const yParity = (0, util_1.bytesToHex)(data[3]);
33+
const r = (0, util_1.bytesToHex)(data[4]);
34+
const s = (0, util_1.bytesToHex)(data[5]);
35+
const jsonItem = {
36+
chainId,
37+
address,
38+
- nonce: nonceList,
39+
+ nonce,
40+
yParity,
41+
r,
42+
s,
43+
@@ -167,20 +160,14 @@ class AuthorizationLists {
44+
for (let key = 0; key < authorizationList.length; key++) {
45+
const authorizationListItem = authorizationList[key];
46+
const address = authorizationListItem[1];
47+
- const nonceList = authorizationListItem[2];
48+
+ const nonce = authorizationListItem[2];
49+
const yParity = authorizationListItem[3];
50+
const r = authorizationListItem[4];
51+
const s = authorizationListItem[5];
52+
- (0, util_1.validateNoLeadingZeroes)({ yParity, r, s });
53+
+ (0, util_1.validateNoLeadingZeroes)({ yParity, r, s, nonce });
54+
if (address.length !== 20) {
55+
throw new Error('Invalid EIP-7702 transaction: address length should be 20 bytes');
56+
}
57+
- if (nonceList.length > 1) {
58+
- throw new Error('Invalid EIP-7702 transaction: nonce list should consist of at most 1 item');
59+
- }
60+
- else if (nonceList.length === 1) {
61+
- (0, util_1.validateNoLeadingZeroes)({ nonce: nonceList[0] });
62+
- }
63+
}
64+
}
65+
static getDataFeeEIP7702(authorityList, common) {
66+
diff --git a/dist/esm/util.js b/dist/esm/util.js
67+
index 36fa7e9917f72b042efc753ba5d1c9cd0d5572db..de454fa2f09a98b2a8716e173d1cd1f87101a490 100644
68+
--- a/dist/esm/util.js
69+
+++ b/dist/esm/util.js
70+
@@ -114,14 +114,11 @@ export class AuthorizationLists {
71+
}
72+
const chainId = hexToBytes(item.chainId);
73+
const addressBytes = hexToBytes(item.address);
74+
- const nonceList = [];
75+
- for (let j = 0; j < item.nonce.length; j++) {
76+
- nonceList.push(hexToBytes(item.nonce[j]));
77+
- }
78+
+ const nonce = hexToBytes(item.nonce);
79+
const yParity = hexToBytes(item.yParity);
80+
const r = hexToBytes(item.r);
81+
const s = hexToBytes(item.s);
82+
- newAuthorizationList.push([chainId, addressBytes, nonceList, yParity, r, s]);
83+
+ newAuthorizationList.push([chainId, addressBytes, nonce, yParity, r, s]);
84+
}
85+
bufferAuthorizationList = newAuthorizationList;
86+
}
87+
@@ -133,18 +130,14 @@ export class AuthorizationLists {
88+
const data = bufferAuthorizationList[i];
89+
const chainId = bytesToHex(data[0]);
90+
const address = bytesToHex(data[1]);
91+
- const nonces = data[2];
92+
- const nonceList = [];
93+
- for (let j = 0; j < nonces.length; j++) {
94+
- nonceList.push(bytesToHex(nonces[j]));
95+
- }
96+
+ const nonce = bytesToHex(data[2]);
97+
const yParity = bytesToHex(data[3]);
98+
const r = bytesToHex(data[4]);
99+
const s = bytesToHex(data[5]);
100+
const jsonItem = {
101+
chainId,
102+
address,
103+
- nonce: nonceList,
104+
+ nonce,
105+
yParity,
106+
r,
107+
s,
108+
@@ -162,20 +155,14 @@ export class AuthorizationLists {
109+
for (let key = 0; key < authorizationList.length; key++) {
110+
const authorizationListItem = authorizationList[key];
111+
const address = authorizationListItem[1];
112+
- const nonceList = authorizationListItem[2];
113+
+ const nonce = authorizationListItem[2];
114+
const yParity = authorizationListItem[3];
115+
const r = authorizationListItem[4];
116+
const s = authorizationListItem[5];
117+
- validateNoLeadingZeroes({ yParity, r, s });
118+
+ validateNoLeadingZeroes({ yParity, r, s, nonce });
119+
if (address.length !== 20) {
120+
throw new Error('Invalid EIP-7702 transaction: address length should be 20 bytes');
121+
}
122+
- if (nonceList.length > 1) {
123+
- throw new Error('Invalid EIP-7702 transaction: nonce list should consist of at most 1 item');
124+
- }
125+
- else if (nonceList.length === 1) {
126+
- validateNoLeadingZeroes({ nonce: nonceList[0] });
127+
- }
128+
}
129+
}
130+
static getDataFeeEIP7702(authorityList, common) {

.yarn/patches/@metamask-transaction-controller-npm-45.0.0-010fef9da6.patch

Lines changed: 0 additions & 17 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ npmAuditIgnoreAdvisories:
4949
# was mistakenly originally created to flag all versions as vulnerable
5050
- 1101059
5151

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
55+
- 1102472
56+
5257
# Temp fix for https://github.com/MetaMask/metamask-extension/pull/16920 for the sake of 11.7.1 hotfix
5358
# This will be removed in this ticket https://github.com/MetaMask/metamask-extension/issues/22299
5459
- 'ts-custom-error (deprecation)'

app/_locales/en/messages.json

Lines changed: 33 additions & 0 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: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build-types/flask/manifest/_base.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
},
1212
"default_title": "MetaMask Flask"
1313
},
14+
"externally_connectable": {
15+
"matches": ["http://*/*", "https://*/*"],
16+
"ids": ["*"]
17+
},
1418
"icons": {
1519
"16": "images/icon-16.png",
1620
"19": "images/icon-19.png",

app/manifest/v2/_barad_dur.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/manifest/v3/_barad_dur.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)