Skip to content

Commit 106e341

Browse files
committed
Merge branch 'main' into mikesposito/refactor/remove-uncached-encryption
2 parents cfa6ae2 + 4fe6a2f commit 106e341

File tree

163 files changed

+4116
-2086
lines changed

Some content is hidden

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

163 files changed

+4116
-2086
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
/packages/seedless-onboarding-controller @MetaMask/web3auth
8282
/packages/shield-controller @MetaMask/web3auth
8383
/packages/subscription-controller @MetaMask/web3auth
84+
/packages/claims-controller @MetaMask/web3auth
8485

8586
## Joint team ownership
8687
/packages/announcement-controller @MetaMask/core-extension-ux @MetaMask/mobile-core-ux
@@ -182,3 +183,5 @@
182183
/packages/subscription-controller/CHANGELOG.md @MetaMask/web3auth @MetaMask/core-platform
183184
/packages/core-backend/package.json @MetaMask/core-platform @MetaMask/metamask-assets
184185
/packages/core-backend/CHANGELOG.md @MetaMask/core-platform @MetaMask/metamask-assets
186+
/packages/claims-controller/package.json @MetaMask/web3auth @MetaMask/core-platform
187+
/packages/claims-controller/CHANGELOG.md @MetaMask/web3auth @MetaMask/core-platform

.github/workflows/changelog-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ on:
66

77
jobs:
88
check_changelog:
9-
uses: MetaMask/github-tools/.github/workflows/changelog-check.yml@bfb5e6fb233edeedd5ee9ed3f15ff7fa9171337f
9+
uses: MetaMask/github-tools/.github/workflows/changelog-check.yml@fc6fe1a3fb591f6afa61f0dbbe7698bd50fab9c7
1010
with:
11-
action-sha: bfb5e6fb233edeedd5ee9ed3f15ff7fa9171337f
11+
action-sha: fc6fe1a3fb591f6afa61f0dbbe7698bd50fab9c7
1212
base-branch: ${{ github.event.pull_request.base.ref }}
1313
head-ref: ${{ github.head_ref }}
1414
labels: ${{ toJSON(github.event.pull_request.labels) }}

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Each package in this repository has its own README where you can find installati
3333
- [`@metamask/bridge-status-controller`](packages/bridge-status-controller)
3434
- [`@metamask/build-utils`](packages/build-utils)
3535
- [`@metamask/chain-agnostic-permission`](packages/chain-agnostic-permission)
36+
- [`@metamask/claims-controller`](packages/claims-controller)
3637
- [`@metamask/composable-controller`](packages/composable-controller)
3738
- [`@metamask/controller-utils`](packages/controller-utils)
3839
- [`@metamask/core-backend`](packages/core-backend)
@@ -103,6 +104,7 @@ linkStyle default opacity:0.5
103104
bridge_status_controller(["@metamask/bridge-status-controller"]);
104105
build_utils(["@metamask/build-utils"]);
105106
chain_agnostic_permission(["@metamask/chain-agnostic-permission"]);
107+
claims_controller(["@metamask/claims-controller"]);
106108
composable_controller(["@metamask/composable-controller"]);
107109
controller_utils(["@metamask/controller-utils"]);
108110
core_backend(["@metamask/core-backend"]);
@@ -211,6 +213,9 @@ linkStyle default opacity:0.5
211213
chain_agnostic_permission --> controller_utils;
212214
chain_agnostic_permission --> network_controller;
213215
chain_agnostic_permission --> permission_controller;
216+
claims_controller --> base_controller;
217+
claims_controller --> controller_utils;
218+
claims_controller --> messenger;
214219
composable_controller --> base_controller;
215220
composable_controller --> messenger;
216221
composable_controller --> json_rpc_engine;
@@ -381,15 +386,16 @@ linkStyle default opacity:0.5
381386
transaction_controller --> gas_fee_controller;
382387
transaction_controller --> network_controller;
383388
transaction_controller --> remote_feature_flag_controller;
389+
transaction_pay_controller --> base_controller;
384390
transaction_pay_controller --> controller_utils;
385391
transaction_pay_controller --> messenger;
386392
transaction_pay_controller --> assets_controllers;
387393
transaction_pay_controller --> bridge_controller;
388394
transaction_pay_controller --> bridge_status_controller;
389395
transaction_pay_controller --> gas_fee_controller;
390396
transaction_pay_controller --> network_controller;
391-
transaction_pay_controller --> transaction_controller;
392397
transaction_pay_controller --> remote_feature_flag_controller;
398+
transaction_pay_controller --> transaction_controller;
393399
user_operation_controller --> base_controller;
394400
user_operation_controller --> controller_utils;
395401
user_operation_controller --> messenger;

eslint-warning-thresholds.json

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"packages/accounts-controller/src/AccountsController.test.ts": {
33
"import-x/namespace": 1
44
},
5+
"packages/accounts-controller/src/utils.ts": {
6+
"@typescript-eslint/no-unsafe-enum-comparison": 8
7+
},
58
"packages/approval-controller/src/ApprovalController.test.ts": {
69
"import-x/order": 1,
710
"jest/no-conditional-in-test": 16
@@ -14,13 +17,34 @@
1417
"n/prefer-global/text-decoder": 1,
1518
"no-shadow": 2
1619
},
20+
"packages/assets-controllers/src/AccountTrackerController.ts": {
21+
"@typescript-eslint/no-misused-promises": 4
22+
},
1723
"packages/assets-controllers/src/CurrencyRateController.test.ts": {
1824
"jest/no-conditional-in-test": 1
1925
},
26+
"packages/assets-controllers/src/DeFiPositionsController/DeFiPositionsController.ts": {
27+
"@typescript-eslint/no-misused-promises": 2
28+
},
29+
"packages/assets-controllers/src/MultichainAssetsController/MultichainAssetsController.ts": {
30+
"@typescript-eslint/no-misused-promises": 3
31+
},
32+
"packages/assets-controllers/src/MultichainAssetsController/utils.ts": {
33+
"@typescript-eslint/no-unsafe-enum-comparison": 1
34+
},
35+
"packages/assets-controllers/src/MultichainAssetsRatesController/MultichainAssetsRatesController.ts": {
36+
"@typescript-eslint/no-misused-promises": 2
37+
},
38+
"packages/assets-controllers/src/MultichainBalancesController/MultichainBalancesController.ts": {
39+
"@typescript-eslint/no-misused-promises": 2
40+
},
2041
"packages/assets-controllers/src/NftController.test.ts": {
2142
"import-x/namespace": 9,
2243
"jest/no-conditional-in-test": 6
2344
},
45+
"packages/assets-controllers/src/NftController.ts": {
46+
"@typescript-eslint/no-misused-promises": 2
47+
},
2448
"packages/assets-controllers/src/NftDetectionController.test.ts": {
2549
"import-x/namespace": 6,
2650
"import-x/order": 3
@@ -50,6 +74,12 @@
5074
"packages/assets-controllers/src/Standards/NftStandards/ERC721/ERC721Standard.ts": {
5175
"prettier/prettier": 1
5276
},
77+
"packages/assets-controllers/src/TokenBalancesController.ts": {
78+
"@typescript-eslint/no-misused-promises": 1
79+
},
80+
"packages/assets-controllers/src/TokenDetectionController.ts": {
81+
"@typescript-eslint/no-misused-promises": 5
82+
},
5383
"packages/assets-controllers/src/TokenListController.test.ts": {
5484
"import-x/namespace": 7,
5585
"import-x/order": 2,
@@ -85,6 +115,9 @@
85115
"packages/base-controller/src/BaseController.test.ts": {
86116
"import-x/namespace": 13
87117
},
118+
"packages/bridge-status-controller/src/utils/transaction.ts": {
119+
"@typescript-eslint/no-unsafe-enum-comparison": 2
120+
},
88121
"packages/build-utils/src/transforms/remove-fenced-code.test.ts": {
89122
"import-x/order": 1
90123
},
@@ -130,7 +163,8 @@
130163
"@typescript-eslint/naming-convention": 1
131164
},
132165
"packages/eth-block-tracker/src/PollingBlockTracker.test.ts": {
133-
"@typescript-eslint/naming-convention": 1
166+
"@typescript-eslint/naming-convention": 1,
167+
"@typescript-eslint/unbound-method": 4
134168
},
135169
"packages/eth-block-tracker/src/PollingBlockTracker.ts": {
136170
"@typescript-eslint/naming-convention": 1,
@@ -158,6 +192,9 @@
158192
"jsdoc/require-jsdoc": 1,
159193
"no-restricted-syntax": 1
160194
},
195+
"packages/eth-json-rpc-middleware/src/block-ref-rewrite.test.ts": {
196+
"@typescript-eslint/no-misused-promises": 3
197+
},
161198
"packages/eth-json-rpc-middleware/src/block-ref-rewrite.ts": {
162199
"jsdoc/match-description": 1
163200
},
@@ -247,6 +284,7 @@
247284
"n/no-unsupported-features/node-builtins": 1
248285
},
249286
"packages/keyring-controller/src/KeyringController.test.ts": {
287+
"@typescript-eslint/no-misused-promises": 1,
250288
"jest/no-conditional-in-test": 1
251289
},
252290
"packages/keyring-controller/src/KeyringController.ts": {
@@ -290,6 +328,12 @@
290328
"packages/message-manager/src/utils.ts": {
291329
"@typescript-eslint/no-unused-vars": 1
292330
},
331+
"packages/multichain-api-middleware/src/handlers/wallet-invokeMethod.ts": {
332+
"@typescript-eslint/no-unsafe-enum-comparison": 1
333+
},
334+
"packages/multichain-transactions-controller/src/MultichainTransactionsController.ts": {
335+
"@typescript-eslint/no-misused-promises": 2
336+
},
293337
"packages/name-controller/src/NameController.ts": {
294338
"@typescript-eslint/no-unsafe-enum-comparison": 1,
295339
"@typescript-eslint/prefer-readonly": 2
@@ -321,6 +365,12 @@
321365
"packages/name-controller/src/util.ts": {
322366
"jsdoc/require-returns": 1
323367
},
368+
"packages/network-controller/src/NetworkController.ts": {
369+
"@typescript-eslint/no-misused-promises": 1
370+
},
371+
"packages/notification-services-controller/src/NotificationServicesController/NotificationServicesController.ts": {
372+
"@typescript-eslint/no-misused-promises": 1
373+
},
324374
"packages/permission-controller/src/PermissionController.test.ts": {
325375
"jest/no-conditional-in-test": 4
326376
},
@@ -366,6 +416,12 @@
366416
"packages/remote-feature-flag-controller/src/utils/user-segmentation-utils.ts": {
367417
"jsdoc/tag-lines": 2
368418
},
419+
"packages/sample-controllers/src/sample-gas-prices-controller.ts": {
420+
"@typescript-eslint/no-misused-promises": 1
421+
},
422+
"packages/sample-controllers/src/sample-gas-prices-service/sample-gas-prices-service.test.ts": {
423+
"@typescript-eslint/no-misused-promises": 4
424+
},
369425
"packages/seedless-onboarding-controller/jest.environment.js": {
370426
"n/no-unsupported-features/node-builtins": 1
371427
},
@@ -375,9 +431,15 @@
375431
"packages/selected-network-controller/tests/SelectedNetworkController.test.ts": {
376432
"jest/no-conditional-in-test": 1
377433
},
378-
"packages/signature-controller/src/SignatureController.ts": {
434+
"packages/shield-controller/src/ShieldController.ts": {
435+
"@typescript-eslint/no-unsafe-enum-comparison": 1
436+
},
437+
"packages/shield-controller/src/backend.ts": {
379438
"@typescript-eslint/no-unsafe-enum-comparison": 3
380439
},
440+
"packages/signature-controller/src/SignatureController.ts": {
441+
"@typescript-eslint/no-unsafe-enum-comparison": 4
442+
},
381443
"packages/signature-controller/src/utils/normalize.ts": {
382444
"@typescript-eslint/no-unused-vars": 1
383445
},

eslint.config.mjs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@ const config = createConfig([
117117
languageOptions: {
118118
parserOptions: {
119119
tsconfigRootDir: import.meta.dirname,
120-
project: './tsconfig.packages.json',
121-
// Disable `projectService` because we run into out-of-memory issues.
122-
// See this ticket for inspiration out how to solve this:
123-
// <https://github.com/typescript-eslint/typescript-eslint/issues/1192>
124-
projectService: false,
125120
},
126121
},
127122
rules: {
@@ -133,6 +128,9 @@ const config = createConfig([
133128
},
134129
],
135130

131+
// TODO: Disable in `eslint-config-typescript`, tracked here: https://github.com/MetaMask/eslint-config/issues/413
132+
'@typescript-eslint/no-unnecessary-type-arguments': 'off',
133+
136134
// This rule does not detect multiple imports of the same file where types
137135
// are being imported in one case and runtime values are being imported in
138136
// another

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/core-monorepo",
3-
"version": "664.0.0",
3+
"version": "666.0.0",
44
"private": true,
55
"description": "Monorepo for packages shared between MetaMask clients",
66
"repository": {
@@ -25,7 +25,7 @@
2525
"lint": "yarn lint:eslint && echo && yarn lint:misc --check && yarn constraints && yarn lint:dependencies && yarn lint:teams && yarn generate-method-action-types --check",
2626
"lint:dependencies": "depcheck && yarn dedupe --check",
2727
"lint:dependencies:fix": "depcheck && yarn dedupe",
28-
"lint:eslint": "yarn build:only-clean && yarn tsx ./scripts/run-eslint.ts --cache",
28+
"lint:eslint": "yarn build:only-clean && yarn tsx ./scripts/run-eslint.ts ",
2929
"lint:fix": "yarn lint:eslint --fix && echo && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies:fix && yarn generate-method-action-types --fix",
3030
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path .gitignore",
3131
"lint:teams": "tsx scripts/lint-teams-json.ts",
@@ -63,6 +63,7 @@
6363
"@metamask/eth-block-tracker": "^14.0.0",
6464
"@metamask/eth-json-rpc-provider": "^5.0.1",
6565
"@metamask/json-rpc-engine": "^10.1.1",
66+
"@metamask/network-controller": "^25.0.0",
6667
"@metamask/utils": "^11.8.1",
6768
"@ts-bridge/cli": "^0.6.4",
6869
"@types/jest": "^27.4.1",
@@ -71,9 +72,6 @@
7172
"@types/semver": "^7",
7273
"@typescript-eslint/eslint-plugin": "^8.7.0",
7374
"@typescript-eslint/parser": "^8.7.0",
74-
"@yarnpkg/cli": "^4.5.3",
75-
"@yarnpkg/core": "^4.1.6",
76-
"@yarnpkg/fslib": "^3.1.1",
7775
"@yarnpkg/types": "^4.0.0",
7876
"babel-jest": "^29.7.0",
7977
"chalk": "^4.1.2",
@@ -100,7 +98,7 @@
10098
"semver": "^7.6.3",
10199
"simple-git-hooks": "^2.8.0",
102100
"tsx": "^4.20.5",
103-
"typescript": "~5.2.2",
101+
"typescript": "~5.3.3",
104102
"typescript-eslint": "^8.7.0",
105103
"yargs": "^17.7.2"
106104
},

packages/account-tree-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"ts-jest": "^27.1.4",
7575
"typedoc": "^0.24.8",
7676
"typedoc-plugin-missing-exports": "^2.0.0",
77-
"typescript": "~5.2.2",
77+
"typescript": "~5.3.3",
7878
"webextension-polyfill": "^0.12.0"
7979
},
8080
"peerDependencies": {

packages/accounts-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"ts-jest": "^27.1.4",
8080
"typedoc": "^0.24.8",
8181
"typedoc-plugin-missing-exports": "^2.0.0",
82-
"typescript": "~5.2.2",
82+
"typescript": "~5.3.3",
8383
"webextension-polyfill": "^0.12.0"
8484
},
8585
"peerDependencies": {

packages/address-book-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"ts-jest": "^27.1.4",
6363
"typedoc": "^0.24.8",
6464
"typedoc-plugin-missing-exports": "^2.0.0",
65-
"typescript": "~5.2.2"
65+
"typescript": "~5.3.3"
6666
},
6767
"engines": {
6868
"node": "^18.18 || >=20"

packages/analytics-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"ts-jest": "^27.1.4",
6363
"typedoc": "^0.24.8",
6464
"typedoc-plugin-missing-exports": "^2.0.0",
65-
"typescript": "~5.2.2"
65+
"typescript": "~5.3.3"
6666
},
6767
"engines": {
6868
"node": "^18.18 || >=20"

0 commit comments

Comments
 (0)