@metamask/selected-network-controller 26.1.0 → 26.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -16
- package/package.json +21 -20
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [26.1.1]
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Bump `@metamask/permission-controller` from `^12.3.0` to `^13.0.0` ([#8661](https://github.com/MetaMask/core/pull/8661))
|
|
15
|
+
- Bump `@metamask/json-rpc-engine` from `^10.2.4` to `^10.3.0` ([#8661](https://github.com/MetaMask/core/pull/8661))
|
|
16
|
+
- Bump `@metamask/messenger` from `^1.0.0` to `^1.2.0` ([#8364](https://github.com/MetaMask/core/pull/8364), [#8373](https://github.com/MetaMask/core/pull/8373), [#8632](https://github.com/MetaMask/core/pull/8632))
|
|
17
|
+
- Bump `@metamask/base-controller` from `^9.0.1` to `^9.1.0` ([#8457](https://github.com/MetaMask/core/pull/8457))
|
|
18
|
+
- Bump `@metamask/network-controller` from `^30.0.1` to `^30.1.0` ([#8636](https://github.com/MetaMask/core/pull/8636))
|
|
19
|
+
|
|
10
20
|
## [26.1.0]
|
|
11
21
|
|
|
12
22
|
### Added
|
|
@@ -148,7 +158,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
148
158
|
|
|
149
159
|
### Changed
|
|
150
160
|
|
|
151
|
-
- Bump `@metamask/base-controller` from `^7.0.0` to `^7.1.1
|
|
161
|
+
- Bump `@metamask/base-controller` from `^7.0.0` to `^7.1.1`, [#5135](https://github.com/MetaMask/core/pull/5135)) ([#5079](https://github.com/MetaMask/core/pull/5079))
|
|
152
162
|
- Bump `@metamask/json-rpc-engine` from `^10.0.1` to `^10.0.2` ([#5082](https://github.com/MetaMask/core/pull/5082))
|
|
153
163
|
- Bump `@metamask/utils` from `^10.0.0` to `^11.0.1` ([#5080](https://github.com/MetaMask/core/pull/5080))
|
|
154
164
|
- This upgrade is not a breaking change because this package does not use `generateRandomMnemonic`.
|
|
@@ -209,7 +219,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
209
219
|
["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as
|
|
210
220
|
["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md).
|
|
211
221
|
All of the ATTW checks now pass.
|
|
212
|
-
- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648))
|
|
222
|
+
- Remove chunk files. ([#4648](https://github.com/MetaMask/core/pull/4648))
|
|
213
223
|
- Previously, the build tool we used to generate JavaScript files extracted
|
|
214
224
|
common code to "chunk" files. While this was intended to make this package
|
|
215
225
|
more tree-shakeable, it also made debugging more difficult for our
|
|
@@ -355,20 +365,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
355
365
|
|
|
356
366
|
### Changed
|
|
357
367
|
|
|
358
|
-
- **BREAKING:** `setNetworkClientIdForDomain` now throws an error if passed `metamask` for the domain param ([#3908](https://github.com/MetaMask/core/pull/3908))
|
|
359
|
-
- **BREAKING:** `setNetworkClientIdForDomain` now fails and throws an error if the passed in `domain` is not currently permissioned in the `PermissionsController
|
|
360
|
-
- **BREAKING:** the `domains` state now no longer contains a `metamask` domain key. Consumers should instead use the `selectedNetworkClientId` from the `NetworkController` to get the selected network for the `metamask` domain ([#3908](https://github.com/MetaMask/core/pull/3908))
|
|
361
|
-
- **BREAKING:** `getProviderAndBlockTracker` now throws an error if called with any domain while the `perDomainNetwork` flag is false. Consumers should instead use the `provider` and `blockTracker` from the `NetworkController` when the `perDomainNetwork` flag is false ([#3908](https://github.com/MetaMask/core/pull/3908))
|
|
362
|
-
- **BREAKING:** `getProviderAndBlockTracker` now throws an error if called with a domain that does not have a networkClientId set ([#3908](https://github.com/MetaMask/core/pull/3908))
|
|
363
|
-
- **BREAKING:** `getNetworkClientIdForDomain` now returns the `selectedNetworkClientId` for the globally selected network if the `perDomainNetwork` flag is false or if the domain is not in the `domains` state ([#3908](https://github.com/MetaMask/core/pull/3908))
|
|
368
|
+
- **BREAKING:** `setNetworkClientIdForDomain` now throws an error if passed `metamask` for the domain param. ([#3908](https://github.com/MetaMask/core/pull/3908))
|
|
369
|
+
- **BREAKING:** `setNetworkClientIdForDomain` now fails and throws an error if the passed in `domain` is not currently permissioned in the `PermissionsController`. ([#3908](https://github.com/MetaMask/core/pull/3908))
|
|
370
|
+
- **BREAKING:** the `domains` state now no longer contains a `metamask` domain key. Consumers should instead use the `selectedNetworkClientId` from the `NetworkController` to get the selected network for the `metamask` domain. ([#3908](https://github.com/MetaMask/core/pull/3908))
|
|
371
|
+
- **BREAKING:** `getProviderAndBlockTracker` now throws an error if called with any domain while the `perDomainNetwork` flag is false. Consumers should instead use the `provider` and `blockTracker` from the `NetworkController` when the `perDomainNetwork` flag is false. ([#3908](https://github.com/MetaMask/core/pull/3908))
|
|
372
|
+
- **BREAKING:** `getProviderAndBlockTracker` now throws an error if called with a domain that does not have a networkClientId set. ([#3908](https://github.com/MetaMask/core/pull/3908))
|
|
373
|
+
- **BREAKING:** `getNetworkClientIdForDomain` now returns the `selectedNetworkClientId` for the globally selected network if the `perDomainNetwork` flag is false or if the domain is not in the `domains` state. ([#3908](https://github.com/MetaMask/core/pull/3908))
|
|
364
374
|
|
|
365
375
|
### Removed
|
|
366
376
|
|
|
367
|
-
- **BREAKING:** Remove logic in `selectedNetworkMiddleware` to set a default `networkClientId` for the requesting origin in the `SelectedNetworkController` when not already set. Now if `networkClientId` is not already set for the requesting origin, the middleware will not set a default `networkClientId` for that origin in the `SelectedNetworkController` but will continue to add the `selectedNetworkClientId` from the `NetworkController` to the `networkClientId` property on the request object ([#3908](https://github.com/MetaMask/core/pull/3908))
|
|
377
|
+
- **BREAKING:** Remove logic in `selectedNetworkMiddleware` to set a default `networkClientId` for the requesting origin in the `SelectedNetworkController` when not already set. Now if `networkClientId` is not already set for the requesting origin, the middleware will not set a default `networkClientId` for that origin in the `SelectedNetworkController` but will continue to add the `selectedNetworkClientId` from the `NetworkController` to the `networkClientId` property on the request object. ([#3908](https://github.com/MetaMask/core/pull/3908))
|
|
368
378
|
|
|
369
379
|
### Fixed
|
|
370
380
|
|
|
371
|
-
- The `SelectedNetworkController` now listens for `networkConfiguration` removal events on the `NetworkController` and updates domains pointed at a removed `networkClientId` to the `selectedNetworkClientId
|
|
381
|
+
- The `SelectedNetworkController` now listens for `networkConfiguration` removal events on the `NetworkController` and updates domains pointed at a removed `networkClientId` to the `selectedNetworkClientId`. ([#3926](https://github.com/MetaMask/core/pull/3926))
|
|
372
382
|
|
|
373
383
|
## [7.0.1]
|
|
374
384
|
|
|
@@ -398,14 +408,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
398
408
|
|
|
399
409
|
### Added
|
|
400
410
|
|
|
401
|
-
- Add `SelectedNetworkMiddlewareJsonRpcRequest` type ([#1970](https://github.com/MetaMask/core/pull/1970))
|
|
402
|
-
- Add `setPerDomainNetwork` method to reset proxies when flag toggled ([#3593](https://github.com/MetaMask/core/pull/3593))
|
|
403
|
-
- Add `state` as a constructor argument ([#3585](https://github.com/MetaMask/core/pull/3585))
|
|
411
|
+
- Add `SelectedNetworkMiddlewareJsonRpcRequest` type. ([#1970](https://github.com/MetaMask/core/pull/1970))
|
|
412
|
+
- Add `setPerDomainNetwork` method to reset proxies when flag toggled. ([#3593](https://github.com/MetaMask/core/pull/3593))
|
|
413
|
+
- Add `state` as a constructor argument. ([#3585](https://github.com/MetaMask/core/pull/3585))
|
|
404
414
|
|
|
405
415
|
### Changed
|
|
406
416
|
|
|
407
|
-
- **BREAKING:** Rename `SelectedNetworkControllerAction` to `SelectedNetworkControllerActions` and `SelectedNetworkControllerEvent` to `SelectedNetworkControllerEvents` for consistency with corresponding type exports from other controllers ([#1970](https://github.com/MetaMask/core/pull/1970))
|
|
408
|
-
- **BREAKING:** `createSelectedNetworkMiddleware` return type is constrained to satisfy `JsonRpcMiddleware<JsonRpcParams, Json>`, and its `req` parameter is constrained to satisfy `SelectedNetworkMiddlewareJsonRpcRequest
|
|
417
|
+
- **BREAKING:** Rename `SelectedNetworkControllerAction` to `SelectedNetworkControllerActions` and `SelectedNetworkControllerEvent` to `SelectedNetworkControllerEvents` for consistency with corresponding type exports from other controllers. ([#1970](https://github.com/MetaMask/core/pull/1970))
|
|
418
|
+
- **BREAKING:** `createSelectedNetworkMiddleware` return type is constrained to satisfy `JsonRpcMiddleware<JsonRpcParams, Json>`, and its `req` parameter is constrained to satisfy `SelectedNetworkMiddlewareJsonRpcRequest`. ([#1970](https://github.com/MetaMask/core/pull/1970))
|
|
409
419
|
|
|
410
420
|
## [4.0.0]
|
|
411
421
|
|
|
@@ -469,7 +479,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
469
479
|
|
|
470
480
|
- Initial Release ([#1643](https://github.com/MetaMask/core/pull/1643))
|
|
471
481
|
|
|
472
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@26.1.
|
|
482
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@26.1.1...HEAD
|
|
483
|
+
[26.1.1]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@26.1.0...@metamask/selected-network-controller@26.1.1
|
|
473
484
|
[26.1.0]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@26.0.3...@metamask/selected-network-controller@26.1.0
|
|
474
485
|
[26.0.3]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@26.0.2...@metamask/selected-network-controller@26.0.3
|
|
475
486
|
[26.0.2]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@26.0.1...@metamask/selected-network-controller@26.0.2
|
package/package.json
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/selected-network-controller",
|
|
3
|
-
"version": "26.1.
|
|
3
|
+
"version": "26.1.1",
|
|
4
4
|
"description": "Provides an interface to the currently selected networkClientId for a given domain",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
6
|
+
"Ethereum",
|
|
7
|
+
"MetaMask"
|
|
8
8
|
],
|
|
9
9
|
"homepage": "https://github.com/MetaMask/core/tree/main/packages/selected-network-controller#readme",
|
|
10
10
|
"bugs": {
|
|
11
11
|
"url": "https://github.com/MetaMask/core/issues"
|
|
12
12
|
},
|
|
13
|
+
"license": "MIT",
|
|
13
14
|
"repository": {
|
|
14
15
|
"type": "git",
|
|
15
16
|
"url": "https://github.com/MetaMask/core.git"
|
|
16
17
|
},
|
|
17
|
-
"
|
|
18
|
+
"files": [
|
|
19
|
+
"dist/"
|
|
20
|
+
],
|
|
18
21
|
"sideEffects": false,
|
|
22
|
+
"main": "./dist/index.cjs",
|
|
23
|
+
"types": "./dist/index.d.cts",
|
|
19
24
|
"exports": {
|
|
20
25
|
".": {
|
|
21
26
|
"import": {
|
|
@@ -29,18 +34,18 @@
|
|
|
29
34
|
},
|
|
30
35
|
"./package.json": "./package.json"
|
|
31
36
|
},
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
],
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public",
|
|
39
|
+
"registry": "https://registry.npmjs.org/"
|
|
40
|
+
},
|
|
37
41
|
"scripts": {
|
|
38
42
|
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
|
|
39
43
|
"build:all": "ts-bridge --project tsconfig.build.json --verbose --clean",
|
|
40
44
|
"build:docs": "typedoc",
|
|
41
45
|
"changelog:update": "../../scripts/update-changelog.sh @metamask/selected-network-controller",
|
|
42
46
|
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/selected-network-controller",
|
|
43
|
-
"
|
|
47
|
+
"messenger-action-types:check": "tsx ../../packages/messenger-cli/src/cli.ts --formatter oxfmt --check",
|
|
48
|
+
"messenger-action-types:generate": "tsx ../../packages/messenger-cli/src/cli.ts --formatter oxfmt --generate",
|
|
44
49
|
"since-latest-release": "../../scripts/since-latest-release.sh",
|
|
45
50
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
|
|
46
51
|
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
|
|
@@ -48,16 +53,16 @@
|
|
|
48
53
|
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
|
|
49
54
|
},
|
|
50
55
|
"dependencies": {
|
|
51
|
-
"@metamask/base-controller": "^9.0
|
|
52
|
-
"@metamask/json-rpc-engine": "^10.
|
|
53
|
-
"@metamask/messenger": "^1.
|
|
54
|
-
"@metamask/network-controller": "^30.0
|
|
55
|
-
"@metamask/permission-controller": "^
|
|
56
|
+
"@metamask/base-controller": "^9.1.0",
|
|
57
|
+
"@metamask/json-rpc-engine": "^10.3.0",
|
|
58
|
+
"@metamask/messenger": "^1.2.0",
|
|
59
|
+
"@metamask/network-controller": "^30.1.0",
|
|
60
|
+
"@metamask/permission-controller": "^13.0.0",
|
|
56
61
|
"@metamask/swappable-obj-proxy": "^2.3.0",
|
|
57
62
|
"@metamask/utils": "^11.9.0"
|
|
58
63
|
},
|
|
59
64
|
"devDependencies": {
|
|
60
|
-
"@metamask/auto-changelog": "^
|
|
65
|
+
"@metamask/auto-changelog": "^6.1.0",
|
|
61
66
|
"@ts-bridge/cli": "^0.6.4",
|
|
62
67
|
"@types/jest": "^29.5.14",
|
|
63
68
|
"deepmerge": "^4.2.2",
|
|
@@ -74,9 +79,5 @@
|
|
|
74
79
|
},
|
|
75
80
|
"engines": {
|
|
76
81
|
"node": "^18.18 || >=20"
|
|
77
|
-
},
|
|
78
|
-
"publishConfig": {
|
|
79
|
-
"access": "public",
|
|
80
|
-
"registry": "https://registry.npmjs.org/"
|
|
81
82
|
}
|
|
82
83
|
}
|