Skip to content

Commit 802f282

Browse files
authored
Merge branch 'develop' into MMI-2119-env-name-as-key
2 parents b3a7935 + 8385506 commit 802f282

File tree

418 files changed

+10436
-7853
lines changed

Some content is hidden

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

418 files changed

+10436
-7853
lines changed

.circleci/config.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,30 @@ version: 2.1
33
executors:
44
node-browsers:
55
docker:
6-
- image: cimg/node:18.18-browsers
6+
- image: cimg/node:20.11-browsers
77
environment:
8+
FONTCONFIG_PATH: /etc/fonts
89
NODE_OPTIONS: --max_old_space_size=3072
910
node-browsers-medium-plus:
1011
docker:
11-
- image: cimg/node:18.18-browsers
12+
- image: cimg/node:20.11-browsers
1213
resource_class: medium+
1314
environment:
15+
FONTCONFIG_PATH: /etc/fonts
1416
NODE_OPTIONS: --max_old_space_size=4096
1517
node-browsers-large:
1618
docker:
17-
- image: cimg/node:18.18-browsers
19+
- image: cimg/node:20.11-browsers
1820
resource_class: large
1921
environment:
22+
FONTCONFIG_PATH: /etc/fonts
2023
NODE_OPTIONS: --max_old_space_size=4096
2124
shellcheck:
2225
docker:
2326
- image: koalaman/shellcheck-alpine@sha256:dfaf08fab58c158549d3be64fb101c626abc5f16f341b569092577ae207db199
2427
playwright:
2528
docker:
26-
- image: mcr.microsoft.com/playwright:v1.39.0-jammy
29+
- image: mcr.microsoft.com/playwright:v1.41.1-jammy
2730

2831
orbs:
2932
gh: circleci/github-cli@2.0

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ body:
104104
- Keystone
105105
- GridPlus Lattice1
106106
- AirGap Vault
107+
- imToken
107108
- Other (please elaborate in the "Additional Context" section)
108109
- type: textarea
109110
id: additional

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18
1+
v20

.storybook/initial-states/approval-screens/add-suggested-token.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const pendingTokenApprovals = {
99
address: '0x6b175474e89094c44da98b954eedeac495271d0f',
1010
symbol: 'ETH',
1111
decimals: 18,
12-
image: './images/eth_logo.png',
12+
image: './images/eth_logo.svg',
1313
unlisted: false,
1414
},
1515
},
@@ -118,4 +118,4 @@ export const pendingTokenApprovals = {
118118
},
119119
},
120120
},
121-
};
121+
};

.storybook/test-data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const state = {
115115
address: '0x6b175474e89094c44da98b954eedeac495271d0f',
116116
symbol: 'ETH',
117117
decimals: 18,
118-
image: './images/eth_logo.png',
118+
image: './images/eth_logo.svg',
119119
unlisted: false,
120120
},
121121
'0xB8c77482e45F1F44dE1745F52C74426C631bDD52': {

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"fileMatch": ["app/manifest/*/*.json"],
99
"url": "https://json.schemastore.org/chrome-manifest"
1010
}
11-
]
11+
],
12+
"typescript.tsdk": "node_modules/typescript/lib"
1213
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
diff --git a/dist/utils.js b/dist/utils.js
2+
index 810f229841ffff83f7a28191bc558862b1809e01..aa2ea845d4cccfac8e28f575d7972bd2dba8decf 100644
3+
--- a/dist/utils.js
4+
+++ b/dist/utils.js
5+
@@ -11,35 +11,40 @@ const uuid_1 = require("uuid");
6+
* @returns The name of the keyring type.
7+
*/
8+
function keyringTypeToName(keyringType) {
9+
- switch (keyringType) {
10+
- case keyring_controller_1.KeyringTypes.simple: {
11+
- return 'Account';
12+
- }
13+
- case keyring_controller_1.KeyringTypes.hd: {
14+
- return 'Account';
15+
- }
16+
- case keyring_controller_1.KeyringTypes.trezor: {
17+
- return 'Trezor';
18+
- }
19+
- case keyring_controller_1.KeyringTypes.ledger: {
20+
- return 'Ledger';
21+
- }
22+
- case keyring_controller_1.KeyringTypes.lattice: {
23+
- return 'Lattice';
24+
- }
25+
- case keyring_controller_1.KeyringTypes.qr: {
26+
- return 'QR';
27+
- }
28+
- case keyring_controller_1.KeyringTypes.snap: {
29+
- return 'Snap Account';
30+
- }
31+
- case keyring_controller_1.KeyringTypes.custody: {
32+
- return 'Custody';
33+
- }
34+
- default: {
35+
- throw new Error(`Unknown keyring ${keyringType}`);
36+
- }
37+
+ // Custody Keyrings follow this pattern
38+
+ if (/^Custody.*/.test(keyringType)) {
39+
+ return "Custody";
40+
+ }
41+
+
42+
+ switch (keyringType) {
43+
+ case keyring_controller_1.KeyringTypes.simple: {
44+
+ return "Account";
45+
}
46+
+ case keyring_controller_1.KeyringTypes.hd: {
47+
+ return "Account";
48+
+ }
49+
+ case keyring_controller_1.KeyringTypes.trezor: {
50+
+ return "Trezor";
51+
+ }
52+
+ case keyring_controller_1.KeyringTypes.ledger: {
53+
+ return "Ledger";
54+
+ }
55+
+ case keyring_controller_1.KeyringTypes.lattice: {
56+
+ return "Lattice";
57+
+ }
58+
+ case keyring_controller_1.KeyringTypes.qr: {
59+
+ return "QR";
60+
+ }
61+
+ case keyring_controller_1.KeyringTypes.snap: {
62+
+ return "Snap Account";
63+
+ }
64+
+ case keyring_controller_1.KeyringTypes.custody: {
65+
+ return "Custody";
66+
+ }
67+
+ default: {
68+
+ throw new Error(`Unknown keyring ${keyringType}`);
69+
+ }
70+
+ }
71+
}
72+
exports.keyringTypeToName = keyringTypeToName;
73+
/**
74+
@@ -48,10 +53,10 @@ exports.keyringTypeToName = keyringTypeToName;
75+
* @returns The generated UUID.
76+
*/
77+
function getUUIDFromAddressOfNormalAccount(address) {
78+
- const v4options = {
79+
- random: (0, ethereumjs_util_1.sha256FromString)(address).slice(0, 16),
80+
- };
81+
- return (0, uuid_1.v4)(v4options);
82+
+ const v4options = {
83+
+ random: (0, ethereumjs_util_1.sha256FromString)(address).slice(0, 16),
84+
+ };
85+
+ return (0, uuid_1.v4)(v4options);
86+
}
87+
exports.getUUIDFromAddressOfNormalAccount = getUUIDFromAddressOfNormalAccount;
88+
//# sourceMappingURL=utils.js.map

.yarn/patches/@metamask-accounts-controller-npm-5.0.0-f877105fa0.patch

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To learn how to contribute to the MetaMask project itself, visit our [Internal D
1414

1515
## Building locally
1616

17-
- Install [Node.js](https://nodejs.org) version 18
17+
- Install [Node.js](https://nodejs.org) version 20
1818
- 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.
1919
- 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.
2020
- Duplicate `.metamaskrc.dist` within the root and rename it to `.metamaskrc` by running `cp .metamaskrc{.dist,}`.

app/_locales/de/messages.json

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

0 commit comments

Comments
 (0)