@metamask/selected-network-controller
Advanced tools
Comparing version 2.0.1 to 3.0.0
@@ -9,2 +9,12 @@ # Changelog | ||
## [3.0.0] | ||
### Changed | ||
- **BREAKING:** Bump dependency and peer dependency on `@metamask/network-controller` to ^14.0.0 ([#1747](https://github.com/MetaMask/core/pull/1747)) | ||
- **BREAKING:** Move from `json-rpc-engine` ^7.1.1 to `@metamask/json-rpc-engine` ^8.0.0 ([#1653](https://github.com/MetaMask/core/pull/1653)) | ||
- **BREAKING:** Bump dependency and peer dependency on `@metamask/network-controller` to ^15.0.0 | ||
- Bump dependency on `@metamask/base-controller` to ^3.2.3 ([#1747](https://github.com/MetaMask/core/pull/1747)) | ||
### Fixed | ||
- `setNetworkClientIdForDomain()` will now ignore the passed in domain value and set the `networkClientId` for the metamask domain instead when the `state.perDomainNetwork` flag is false (default) ([#1757](https://github.com/MetaMask/core/pull/1757)) | ||
## [2.0.1] | ||
@@ -22,5 +32,6 @@ ### Changed | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@2.0.1...HEAD | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@3.0.0...HEAD | ||
[3.0.0]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@2.0.1...@metamask/selected-network-controller@3.0.0 | ||
[2.0.1]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@2.0.0...@metamask/selected-network-controller@2.0.1 | ||
[2.0.0]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@1.0.0...@metamask/selected-network-controller@2.0.0 | ||
[1.0.0]: https://github.com/MetaMask/core/releases/tag/@metamask/selected-network-controller@1.0.0 |
@@ -54,3 +54,7 @@ "use strict"; | ||
this.update((state) => { | ||
state.domains[domain] = networkClientId; | ||
if (state.perDomainNetwork) { | ||
state.domains[domain] = networkClientId; | ||
return; | ||
} | ||
state.domains[METAMASK_DOMAIN] = networkClientId; | ||
}); | ||
@@ -57,0 +61,0 @@ } |
import type { ControllerMessenger } from '@metamask/base-controller'; | ||
import type { JsonRpcMiddleware } from '@metamask/json-rpc-engine'; | ||
import type { NetworkControllerGetStateAction } from '@metamask/network-controller'; | ||
import type { JsonRpcMiddleware } from 'json-rpc-engine'; | ||
import type { SelectedNetworkControllerGetNetworkClientIdForDomainAction, SelectedNetworkControllerSetNetworkClientIdForDomainAction } from './SelectedNetworkController'; | ||
export declare const createSelectedNetworkMiddleware: (messenger: ControllerMessenger<SelectedNetworkControllerGetNetworkClientIdForDomainAction | SelectedNetworkControllerSetNetworkClientIdForDomainAction | NetworkControllerGetStateAction, never>) => JsonRpcMiddleware<any, any>; | ||
//# sourceMappingURL=SelectedNetworkMiddleware.d.ts.map |
{ | ||
"name": "@metamask/selected-network-controller", | ||
"version": "2.0.1", | ||
"version": "3.0.0", | ||
"description": "Provides an interface to the currently selected networkClientId for a given domain", | ||
@@ -28,8 +28,9 @@ "keywords": [ | ||
"test": "jest", | ||
"test:clean": "jest --clearCache", | ||
"test:watch": "jest --watch" | ||
}, | ||
"dependencies": { | ||
"@metamask/base-controller": "^3.2.2", | ||
"@metamask/network-controller": "^13.0.1", | ||
"json-rpc-engine": "^6.1.0" | ||
"@metamask/base-controller": "^3.2.3", | ||
"@metamask/json-rpc-engine": "^7.1.1", | ||
"@metamask/network-controller": "^15.0.0" | ||
}, | ||
@@ -46,8 +47,8 @@ "devDependencies": { | ||
"ts-jest": "^27.1.4", | ||
"typedoc": "^0.23.15", | ||
"typedoc-plugin-missing-exports": "^0.23.0", | ||
"typedoc": "^0.24.8", | ||
"typedoc-plugin-missing-exports": "^2.0.0", | ||
"typescript": "~4.8.4" | ||
}, | ||
"peerDependencies": { | ||
"@metamask/network-controller": "^13.0.1" | ||
"@metamask/network-controller": "^15.0.0" | ||
}, | ||
@@ -54,0 +55,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28649
188
+ Added@metamask/abi-utils@2.0.4(transitive)
+ Added@metamask/eth-block-tracker@9.0.3(transitive)
+ Added@metamask/eth-json-rpc-infura@9.1.0(transitive)
+ Added@metamask/eth-json-rpc-middleware@12.1.2(transitive)
+ Added@metamask/eth-json-rpc-provider@2.3.23.0.2(transitive)
+ Added@metamask/eth-sig-util@7.0.3(transitive)
+ Added@metamask/json-rpc-engine@8.0.2(transitive)
+ Added@metamask/network-controller@15.2.0(transitive)
+ Added@noble/hashes@1.6.0(transitive)
+ Added@types/node@22.9.3(transitive)
+ Addedcipher-base@1.0.5(transitive)
+ Addedeth-block-tracker@8.1.0(transitive)
+ Addedklona@2.0.6(transitive)
+ Addedpify@5.0.0(transitive)
+ Addedundici-types@6.19.8(transitive)
- Removedjson-rpc-engine@^6.1.0
- Removed@metamask/abi-utils@1.2.0(transitive)
- Removed@metamask/eth-json-rpc-infura@8.1.1(transitive)
- Removed@metamask/eth-json-rpc-middleware@11.0.2(transitive)
- Removed@metamask/eth-json-rpc-provider@1.0.1(transitive)
- Removed@metamask/eth-sig-util@6.0.2(transitive)
- Removed@metamask/network-controller@13.0.1(transitive)
- Removed@metamask/utils@3.6.04.0.05.0.26.2.0(transitive)
- Removed@noble/hashes@1.6.1(transitive)
- Removed@scure/base@1.2.1(transitive)
- Removed@types/node@22.10.0(transitive)
- Removedcipher-base@1.0.6(transitive)
- Removedclone@2.1.2(transitive)
- Removedeth-block-tracker@7.1.0(transitive)
- Removedeth-rpc-errors@4.0.3(transitive)
- Removedethjs-util@0.1.6(transitive)
- Removedjson-rpc-engine@6.1.0(transitive)
- Removedpify@3.0.0(transitive)
- Removedsuperstruct@1.0.4(transitive)
- Removedtweetnacl-util@0.15.1(transitive)
- Removedundici-types@6.20.0(transitive)