@metamask-previews/network-controller 27.0.0-preview-5dcbfa3d → 27.0.0-preview-db01d69
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 +1 -6
- package/dist/NetworkController.cjs +6 -1
- package/dist/NetworkController.cjs.map +1 -1
- package/dist/NetworkController.d.cts.map +1 -1
- package/dist/NetworkController.d.mts.map +1 -1
- package/dist/NetworkController.mjs +7 -2
- package/dist/NetworkController.mjs.map +1 -1
- package/dist/constants.cjs +11 -1
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +8 -0
- package/dist/constants.d.cts.map +1 -1
- package/dist/constants.d.mts +8 -0
- package/dist/constants.d.mts.map +1 -1
- package/dist/constants.mjs +10 -0
- package/dist/constants.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 +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,15 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
### Added
|
|
11
|
-
|
|
12
|
-
- Add MegaETH Testnet V2 support ([#7272](https://github.com/MetaMask/core/pull/7272))
|
|
13
|
-
- Add `megaeth-testnet-v2` in method `getDefaultCustomNetworkConfigurationsByChainId`
|
|
14
|
-
- Add `megaeth-testnet-v2` in type `AdditionalDefaultNetwork`
|
|
15
|
-
|
|
16
10
|
### Changed
|
|
17
11
|
|
|
18
12
|
- Update the default set of Infura networks to include Monad Testnet ([#7067](https://github.com/MetaMask/core/pull/7067))
|
|
13
|
+
- Update Monad Testnet Network Client Id ([#7333](https://github.com/MetaMask/core/pull/7333))
|
|
19
14
|
|
|
20
15
|
## [27.0.0]
|
|
21
16
|
|
|
@@ -162,7 +162,6 @@ function getDefaultCustomNetworkConfigurationsByChainId() {
|
|
|
162
162
|
// default networks.
|
|
163
163
|
return {
|
|
164
164
|
[controller_utils_1.ChainId['megaeth-testnet']]: getCustomNetworkConfiguration(controller_utils_1.CustomNetworkType['megaeth-testnet']),
|
|
165
|
-
[controller_utils_1.ChainId['megaeth-testnet-v2']]: getCustomNetworkConfiguration(controller_utils_1.CustomNetworkType['megaeth-testnet-v2']),
|
|
166
165
|
[controller_utils_1.ChainId['monad-testnet']]: getCustomNetworkConfiguration(controller_utils_1.CustomNetworkType['monad-testnet']),
|
|
167
166
|
};
|
|
168
167
|
}
|
|
@@ -279,6 +278,12 @@ function deriveInfuraNetworkNameFromRpcEndpointUrl(rpcEndpointUrl) {
|
|
|
279
278
|
if ((0, controller_utils_1.isInfuraNetworkType)(match.groups.networkName)) {
|
|
280
279
|
return match.groups.networkName;
|
|
281
280
|
}
|
|
281
|
+
// Infura URL can be inserted by user manually,
|
|
282
|
+
// in case the network name extra from URL is not mapped to InfuraNetworkType,
|
|
283
|
+
// we should add a fallback mapping here.
|
|
284
|
+
if ((0, utils_1.hasProperty)(constants_1.FALLBACK_INFURA_NETWORK_TYPE_MAPPING, match.groups.networkName)) {
|
|
285
|
+
return constants_1.FALLBACK_INFURA_NETWORK_TYPE_MAPPING[match.groups.networkName];
|
|
286
|
+
}
|
|
282
287
|
throw new Error(`Unknown Infura network '${match.groups.networkName}'`);
|
|
283
288
|
}
|
|
284
289
|
throw new Error('Could not derive Infura network from RPC endpoint URL');
|