@metamask-previews/network-controller 23.1.0-preview-888fa154 → 23.2.0-preview-ded32bd
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 +29 -1
- package/dist/NetworkController.cjs +4 -0
- package/dist/NetworkController.cjs.map +1 -1
- package/dist/NetworkController.d.cts +2 -2
- package/dist/NetworkController.d.cts.map +1 -1
- package/dist/NetworkController.d.mts +2 -2
- package/dist/NetworkController.d.mts.map +1 -1
- package/dist/NetworkController.mjs +5 -1
- package/dist/NetworkController.mjs.map +1 -1
- package/dist/constants.cjs +7 -1
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +6 -0
- package/dist/constants.d.cts.map +1 -1
- package/dist/constants.d.mts +6 -0
- package/dist/constants.d.mts.map +1 -1
- package/dist/constants.mjs +6 -0
- package/dist/constants.mjs.map +1 -1
- package/dist/create-network-client.cjs +1 -1
- package/dist/create-network-client.cjs.map +1 -1
- package/dist/create-network-client.mjs +1 -1
- package/dist/create-network-client.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [23.2.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add optional `additionalDefaultNetworks` option to `NetworkController` constructor ([#5527](https://github.com/MetaMask/core/pull/5527))
|
|
15
|
+
- This can be used to customize which custom networks the default `networkConfigurationsByChainId` includes.
|
|
16
|
+
- Add `getSelectedChainId` method to `NetworkController` ([#5516](https://github.com/MetaMask/core/pull/5516))
|
|
17
|
+
- This is also callable via the messenger.
|
|
18
|
+
- Add `DEPRECATED_NETWORKS` constant ([#5560](https://github.com/MetaMask/core/pull/5560))
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Remove Goerli and Linea Goerli from set of default networks ([#5560](https://github.com/MetaMask/core/pull/5560))
|
|
23
|
+
- Note that if you do not pass any initial state to NetworkController, this means that `0x5` and `0xe704` will no longer be keys in `networkConfigurationsByChainId`.
|
|
24
|
+
- We are not counting this as a breaking change because we don't make any guarantees about what keys are present in `networkConfigurationsByChainId` at runtime — only that they must be valid chain IDs.
|
|
25
|
+
- If you want more of a guarantee, you are recommended to persist the NetworkController state and then pass it back through as initial state.
|
|
26
|
+
- Update `RpcEndpoint` so that `failoverUrls` is optional ([#5561](https://github.com/MetaMask/core/pull/5561))
|
|
27
|
+
- This property was introduced in 23.0.0 as a breaking change, but this change makes it non-breaking.
|
|
28
|
+
- Update `NetworkClientConfiguration` so that `failoverUrls` is optional ([#5561](https://github.com/MetaMask/core/pull/5561))
|
|
29
|
+
- This property was introduced in 23.0.0 as a breaking change, but this change makes it non-breaking.
|
|
30
|
+
- Bump `@metamask/controller-utils` to `^11.7.0` ([#5583](https://github.com/MetaMask/core/pull/5583))
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- Upgrade `@metamask/eth-json-rpc-infura` to `^10.1.1` and `@metamask/eth-json-rpc-infura` to `^16.0.1` ([#5573](https://github.com/MetaMask/core/pull/5573))
|
|
35
|
+
- This fixes a bug where non-standard unsuccessful JSON-RPC errors were being ignored/discarded
|
|
36
|
+
|
|
10
37
|
## [23.1.0]
|
|
11
38
|
|
|
12
39
|
### Added
|
|
@@ -787,7 +814,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
787
814
|
|
|
788
815
|
All changes listed after this point were applied to this package following the monorepo conversion.
|
|
789
816
|
|
|
790
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/network-controller@23.
|
|
817
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/network-controller@23.2.0...HEAD
|
|
818
|
+
[23.2.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@23.1.0...@metamask/network-controller@23.2.0
|
|
791
819
|
[23.1.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@23.0.0...@metamask/network-controller@23.1.0
|
|
792
820
|
[23.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@22.2.1...@metamask/network-controller@23.0.0
|
|
793
821
|
[22.2.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@22.2.0...@metamask/network-controller@22.2.1
|
|
@@ -129,6 +129,10 @@ function getDefaultNetworkConfigurationsByChainId(additionalDefaultNetworks = []
|
|
|
129
129
|
function getDefaultInfuraNetworkConfigurationsByChainId() {
|
|
130
130
|
return Object.values(controller_utils_1.InfuraNetworkType).reduce((obj, infuraNetworkType) => {
|
|
131
131
|
const chainId = controller_utils_1.ChainId[infuraNetworkType];
|
|
132
|
+
// Skip deprecated network as default network.
|
|
133
|
+
if (constants_1.DEPRECATED_NETWORKS.has(chainId)) {
|
|
134
|
+
return obj;
|
|
135
|
+
}
|
|
132
136
|
const rpcEndpointUrl =
|
|
133
137
|
// This ESLint rule mistakenly produces an error.
|
|
134
138
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|