Skip to content

Commit 91aec47

Browse files
committed
Merge remote-tracking branch 'origin/main' into identity150-social-pairing-poc
Signed-off-by: Mircea Nistor <mirceanis@gmail.com>
2 parents 295f258 + 6010310 commit 91aec47

File tree

19 files changed

+543
-67
lines changed

19 files changed

+543
-67
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
diff --git a/_PATCH.txt b/_PATCH.txt
2+
new file mode 100644
3+
index 0000000000000000000000000000000000000000..94d9729bdc09c57a213683e048f1edb9b0d8fe42
4+
--- /dev/null
5+
+++ b/_PATCH.txt
6+
@@ -0,0 +1,2 @@
7+
+This patch fixes a bug in Lodash when it's run in a contentscript on Firefox.
8+
+See here for details: https://github.com/lodash/lodash/issues/5934
9+
diff --git a/_freeGlobal.js b/_freeGlobal.js
10+
index bbec998fc8cbaaeec1f848017aa8e232d4d419eb..37addf20c9846f1729b83c67746714e6bcc6565d 100644
11+
--- a/_freeGlobal.js
12+
+++ b/_freeGlobal.js
13+
@@ -1,4 +1,4 @@
14+
/** Detect free variable `global` from Node.js. */
15+
-var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
16+
+var freeGlobal = typeof globalThis == 'object' && globalThis && globalThis.Object === Object && globalThis;
17+
18+
module.exports = freeGlobal;
19+
diff --git a/core.js b/core.js
20+
index be1d567d629fdfda05efcaa6adfb480d93702889..c74af2204241654129a4b8d9bc8e1ad235c464f1 100644
21+
--- a/core.js
22+
+++ b/core.js
23+
@@ -62,7 +62,7 @@
24+
};
25+
26+
/** Detect free variable `global` from Node.js. */
27+
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
28+
+ var freeGlobal = typeof globalThis == 'object' && globalThis && globalThis.Object === Object && globalThis;
29+
30+
/** Detect free variable `self`. */
31+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
32+
diff --git a/lodash.js b/lodash.js
33+
index 4131e936cd1e0521ac7be3a9d4bfb9f1fdb35462..5febc1c8b908871a65db4ffcc8ed4a42f9c648be 100644
34+
--- a/lodash.js
35+
+++ b/lodash.js
36+
@@ -427,7 +427,7 @@
37+
freeParseInt = parseInt;
38+
39+
/** Detect free variable `global` from Node.js. */
40+
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
41+
+ var freeGlobal = typeof globalThis == 'object' && globalThis && globalThis.Object === Object && globalThis;
42+
43+
/** Detect free variable `self`. */
44+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

app/scripts/metamask-controller.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4351,6 +4351,7 @@ export default class MetamaskController extends EventEmitter {
43514351

43524352
// E2E testing
43534353
throwTestError: this.throwTestError.bind(this),
4354+
captureTestError: this.captureTestError.bind(this),
43544355

43554356
// NameController
43564357
updateProposedNames: this.nameController.updateProposedNames.bind(
@@ -8403,6 +8404,21 @@ export default class MetamaskController extends EventEmitter {
84038404
});
84048405
}
84058406

8407+
/**
8408+
* Capture an artificial error in a timeout handler for testing purposes.
8409+
*
8410+
* @param message - The error message.
8411+
* @deprecated This is only mean to facilitiate E2E testing. We should not
8412+
* use this for handling errors.
8413+
*/
8414+
captureTestError(message) {
8415+
setTimeout(() => {
8416+
const error = new Error(message);
8417+
error.name = 'TestError';
8418+
global.sentry.captureException(error);
8419+
});
8420+
}
8421+
84068422
getTransactionMetricsRequest() {
84078423
const controllerActions = {
84088424
// Metametrics Actions

lavamoat/browserify/beta/policy.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,15 +1301,15 @@
13011301
"setTimeout": true
13021302
},
13031303
"packages": {
1304-
"@ethereumjs/tx>@ethereumjs/util": true,
13051304
"@metamask/controller-utils>@metamask/ethjs-unit": true,
13061305
"@metamask/utils": true,
13071306
"@metamask/controller-utils>@spruceid/siwe-parser": true,
13081307
"bn.js": true,
13091308
"browserify>buffer": true,
13101309
"cockatiel": true,
13111310
"eth-ens-namehash": true,
1312-
"eslint>fast-deep-equal": true
1311+
"eslint>fast-deep-equal": true,
1312+
"lodash": true
13131313
}
13141314
},
13151315
"@metamask/delegation-controller": {
@@ -4264,7 +4264,7 @@
42644264
"string.prototype.matchall>get-intrinsic>get-proto": true,
42654265
"string.prototype.matchall>es-abstract>gopd": true,
42664266
"string.prototype.matchall>has-symbols": true,
4267-
"depcheck>is-core-module>hasown": true,
4267+
"axios>form-data>hasown": true,
42684268
"string.prototype.matchall>get-intrinsic>math-intrinsics": true
42694269
}
42704270
},
@@ -4348,7 +4348,7 @@
43484348
"@toruslabs/eccrypto>elliptic>minimalistic-assert": true
43494349
}
43504350
},
4351-
"depcheck>is-core-module>hasown": {
4351+
"axios>form-data>hasown": {
43524352
"packages": {
43534353
"browserify>has>function-bind": true
43544354
}
@@ -4435,7 +4435,7 @@
44354435
"string.prototype.matchall>internal-slot": {
44364436
"packages": {
44374437
"string.prototype.matchall>es-abstract>es-errors": true,
4438-
"depcheck>is-core-module>hasown": true,
4438+
"axios>form-data>hasown": true,
44394439
"string.prototype.matchall>side-channel": true
44404440
}
44414441
},

lavamoat/browserify/experimental/policy.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,15 +1301,15 @@
13011301
"setTimeout": true
13021302
},
13031303
"packages": {
1304-
"@ethereumjs/tx>@ethereumjs/util": true,
13051304
"@metamask/controller-utils>@metamask/ethjs-unit": true,
13061305
"@metamask/utils": true,
13071306
"@metamask/controller-utils>@spruceid/siwe-parser": true,
13081307
"bn.js": true,
13091308
"browserify>buffer": true,
13101309
"cockatiel": true,
13111310
"eth-ens-namehash": true,
1312-
"eslint>fast-deep-equal": true
1311+
"eslint>fast-deep-equal": true,
1312+
"lodash": true
13131313
}
13141314
},
13151315
"@metamask/delegation-controller": {
@@ -4264,7 +4264,7 @@
42644264
"string.prototype.matchall>get-intrinsic>get-proto": true,
42654265
"string.prototype.matchall>es-abstract>gopd": true,
42664266
"string.prototype.matchall>has-symbols": true,
4267-
"depcheck>is-core-module>hasown": true,
4267+
"axios>form-data>hasown": true,
42684268
"string.prototype.matchall>get-intrinsic>math-intrinsics": true
42694269
}
42704270
},
@@ -4348,7 +4348,7 @@
43484348
"@toruslabs/eccrypto>elliptic>minimalistic-assert": true
43494349
}
43504350
},
4351-
"depcheck>is-core-module>hasown": {
4351+
"axios>form-data>hasown": {
43524352
"packages": {
43534353
"browserify>has>function-bind": true
43544354
}
@@ -4435,7 +4435,7 @@
44354435
"string.prototype.matchall>internal-slot": {
44364436
"packages": {
44374437
"string.prototype.matchall>es-abstract>es-errors": true,
4438-
"depcheck>is-core-module>hasown": true,
4438+
"axios>form-data>hasown": true,
44394439
"string.prototype.matchall>side-channel": true
44404440
}
44414441
},

lavamoat/browserify/flask/policy.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,15 +1301,15 @@
13011301
"setTimeout": true
13021302
},
13031303
"packages": {
1304-
"@ethereumjs/tx>@ethereumjs/util": true,
13051304
"@metamask/controller-utils>@metamask/ethjs-unit": true,
13061305
"@metamask/utils": true,
13071306
"@metamask/controller-utils>@spruceid/siwe-parser": true,
13081307
"bn.js": true,
13091308
"browserify>buffer": true,
13101309
"cockatiel": true,
13111310
"eth-ens-namehash": true,
1312-
"eslint>fast-deep-equal": true
1311+
"eslint>fast-deep-equal": true,
1312+
"lodash": true
13131313
}
13141314
},
13151315
"@metamask/delegation-controller": {
@@ -4264,7 +4264,7 @@
42644264
"string.prototype.matchall>get-intrinsic>get-proto": true,
42654265
"string.prototype.matchall>es-abstract>gopd": true,
42664266
"string.prototype.matchall>has-symbols": true,
4267-
"depcheck>is-core-module>hasown": true,
4267+
"axios>form-data>hasown": true,
42684268
"string.prototype.matchall>get-intrinsic>math-intrinsics": true
42694269
}
42704270
},
@@ -4348,7 +4348,7 @@
43484348
"@toruslabs/eccrypto>elliptic>minimalistic-assert": true
43494349
}
43504350
},
4351-
"depcheck>is-core-module>hasown": {
4351+
"axios>form-data>hasown": {
43524352
"packages": {
43534353
"browserify>has>function-bind": true
43544354
}
@@ -4435,7 +4435,7 @@
44354435
"string.prototype.matchall>internal-slot": {
44364436
"packages": {
44374437
"string.prototype.matchall>es-abstract>es-errors": true,
4438-
"depcheck>is-core-module>hasown": true,
4438+
"axios>form-data>hasown": true,
44394439
"string.prototype.matchall>side-channel": true
44404440
}
44414441
},

lavamoat/browserify/main/policy.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,15 +1301,15 @@
13011301
"setTimeout": true
13021302
},
13031303
"packages": {
1304-
"@ethereumjs/tx>@ethereumjs/util": true,
13051304
"@metamask/controller-utils>@metamask/ethjs-unit": true,
13061305
"@metamask/utils": true,
13071306
"@metamask/controller-utils>@spruceid/siwe-parser": true,
13081307
"bn.js": true,
13091308
"browserify>buffer": true,
13101309
"cockatiel": true,
13111310
"eth-ens-namehash": true,
1312-
"eslint>fast-deep-equal": true
1311+
"eslint>fast-deep-equal": true,
1312+
"lodash": true
13131313
}
13141314
},
13151315
"@metamask/delegation-controller": {
@@ -4264,7 +4264,7 @@
42644264
"string.prototype.matchall>get-intrinsic>get-proto": true,
42654265
"string.prototype.matchall>es-abstract>gopd": true,
42664266
"string.prototype.matchall>has-symbols": true,
4267-
"depcheck>is-core-module>hasown": true,
4267+
"axios>form-data>hasown": true,
42684268
"string.prototype.matchall>get-intrinsic>math-intrinsics": true
42694269
}
42704270
},
@@ -4348,7 +4348,7 @@
43484348
"@toruslabs/eccrypto>elliptic>minimalistic-assert": true
43494349
}
43504350
},
4351-
"depcheck>is-core-module>hasown": {
4351+
"axios>form-data>hasown": {
43524352
"packages": {
43534353
"browserify>has>function-bind": true
43544354
}
@@ -4435,7 +4435,7 @@
44354435
"string.prototype.matchall>internal-slot": {
44364436
"packages": {
44374437
"string.prototype.matchall>es-abstract>es-errors": true,
4438-
"depcheck>is-core-module>hasown": true,
4438+
"axios>form-data>hasown": true,
44394439
"string.prototype.matchall>side-channel": true
44404440
}
44414441
},

lavamoat/build-system/policy.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2515,14 +2515,14 @@
25152515
"string.prototype.matchall>call-bind>es-define-property": true,
25162516
"string.prototype.matchall>es-abstract>es-errors": true,
25172517
"string.prototype.matchall>es-abstract>es-object-atoms": true,
2518-
"string.prototype.matchall>es-abstract>es-set-tostringtag": true,
2518+
"axios>form-data>es-set-tostringtag": true,
25192519
"string.prototype.matchall>es-abstract>es-to-primitive": true,
25202520
"string.prototype.matchall>get-intrinsic": true,
25212521
"string.prototype.matchall>es-abstract>gopd": true,
25222522
"string.prototype.matchall>es-abstract>has-property-descriptors": true,
25232523
"string.prototype.matchall>es-abstract>has-proto": true,
25242524
"string.prototype.matchall>has-symbols": true,
2525-
"depcheck>is-core-module>hasown": true,
2525+
"axios>form-data>hasown": true,
25262526
"string.prototype.matchall>internal-slot": true,
25272527
"string.prototype.matchall>es-abstract>is-callable": true,
25282528
"string.prototype.matchall>es-abstract>is-regex": true,
@@ -2537,11 +2537,12 @@
25372537
"string.prototype.matchall>es-abstract>es-errors": true
25382538
}
25392539
},
2540-
"string.prototype.matchall>es-abstract>es-set-tostringtag": {
2540+
"axios>form-data>es-set-tostringtag": {
25412541
"packages": {
2542+
"string.prototype.matchall>es-abstract>es-errors": true,
25422543
"string.prototype.matchall>get-intrinsic": true,
25432544
"koa>is-generator-function>has-tostringtag": true,
2544-
"depcheck>is-core-module>hasown": true
2545+
"axios>form-data>hasown": true
25452546
}
25462547
},
25472548
"eslint-plugin-react>array.prototype.flatmap>es-shim-unscopables": {
@@ -3439,7 +3440,7 @@
34393440
"string.prototype.matchall>get-intrinsic>get-proto": true,
34403441
"string.prototype.matchall>es-abstract>gopd": true,
34413442
"string.prototype.matchall>has-symbols": true,
3442-
"depcheck>is-core-module>hasown": true,
3443+
"axios>form-data>hasown": true,
34433444
"string.prototype.matchall>get-intrinsic>math-intrinsics": true
34443445
}
34453446
},
@@ -3846,7 +3847,7 @@
38463847
"browserify>has>function-bind": true
38473848
}
38483849
},
3849-
"depcheck>is-core-module>hasown": {
3850+
"axios>form-data>hasown": {
38503851
"packages": {
38513852
"browserify>has>function-bind": true
38523853
}
@@ -3951,7 +3952,7 @@
39513952
"string.prototype.matchall>internal-slot": {
39523953
"packages": {
39533954
"string.prototype.matchall>es-abstract>es-errors": true,
3954-
"depcheck>is-core-module>hasown": true,
3955+
"axios>form-data>hasown": true,
39553956
"string.prototype.matchall>side-channel": true
39563957
}
39573958
},
@@ -4000,7 +4001,7 @@
40004001
"process.versions": true
40014002
},
40024003
"packages": {
4003-
"depcheck>is-core-module>hasown": true
4004+
"axios>form-data>hasown": true
40044005
}
40054006
},
40064007
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": {

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@
235235
"@ledgerhq/errors": "^6.21.0",
236236
"nanoid@npm:^5.1.5": "^3.3.8",
237237
"tar-fs@npm:^2.1.0": "^2.1.3",
238-
"lodash.memoize@npm:^4.1.2": "patch:lodash.memoize@npm%3A4.1.2#~/.yarn/patches/lodash.memoize-npm-4.1.2-0e6250041f.patch"
238+
"lodash.memoize@npm:^4.1.2": "patch:lodash.memoize@npm%3A4.1.2#~/.yarn/patches/lodash.memoize-npm-4.1.2-0e6250041f.patch",
239+
"lodash": "patch:lodash@npm%3A4.17.21#~/.yarn/patches/lodash-npm-4.17.21-6382451519.patch"
239240
},
240241
"dependencies": {
241242
"@babel/runtime": "patch:@babel/runtime@npm%3A7.25.9#~/.yarn/patches/@babel-runtime-npm-7.25.9-fe8c62510a.patch",
@@ -272,7 +273,7 @@
272273
"@metamask/browser-passworder": "^4.3.0",
273274
"@metamask/chain-agnostic-permission": "^0.8.0",
274275
"@metamask/contract-metadata": "^2.5.0",
275-
"@metamask/controller-utils": "^11.9.0",
276+
"@metamask/controller-utils": "^11.11.0",
276277
"@metamask/delegation-controller": "^0.4.0",
277278
"@metamask/delegation-deployments": "^0.11.0",
278279
"@metamask/design-system-react": "^0.1.0",

test/e2e/page-objects/pages/account-list-page.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,13 @@ class AccountListPage {
652652
await this.driver.waitForSelector(this.walletDetailsButton);
653653
}
654654

655+
// TODO: Fix in https://github.com/MetaMask/metamask-extension/issues/31860
656+
// eslint-disable-next-line @typescript-eslint/naming-convention
657+
async clickWalletDetailsButton(): Promise<void> {
658+
console.log('Click wallet details button');
659+
await this.driver.clickElement(this.walletDetailsButton);
660+
}
661+
655662
// TODO: Fix in https://github.com/MetaMask/metamask-extension/issues/31860
656663
// eslint-disable-next-line @typescript-eslint/naming-convention
657664
async check_accountNotDisplayedInAccountList(

0 commit comments

Comments
 (0)