Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/118.0.0 #3958

Merged
merged 11 commits into from
Feb 22, 2024
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/core-monorepo",
"version": "117.0.0",
"version": "118.0.0",
"private": true,
"description": "Monorepo for packages shared between MetaMask clients",
"repository": {
Expand Down
9 changes: 8 additions & 1 deletion packages/queued-request-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.5.0]

### Changed

- **BREAKING:** Bump `@metamask/selected-network-controller` peer dependency to `^8.0.0` ([#3958](https://github.com/MetaMask/core/pull/3958))

## [0.4.0]

### Changed
Expand Down Expand Up @@ -88,7 +94,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initial release

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/queued-request-controller@0.4.0...HEAD
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/queued-request-controller@0.5.0...HEAD
[0.5.0]: https://github.com/MetaMask/core/compare/@metamask/queued-request-controller@0.4.0...@metamask/queued-request-controller@0.5.0
[0.4.0]: https://github.com/MetaMask/core/compare/@metamask/queued-request-controller@0.3.0...@metamask/queued-request-controller@0.4.0
[0.3.0]: https://github.com/MetaMask/core/compare/@metamask/queued-request-controller@0.2.0...@metamask/queued-request-controller@0.3.0
[0.2.0]: https://github.com/MetaMask/core/compare/@metamask/queued-request-controller@0.1.4...@metamask/queued-request-controller@0.2.0
Expand Down
6 changes: 3 additions & 3 deletions packages/queued-request-controller/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/queued-request-controller",
"version": "0.4.0",
"version": "0.5.0",
"description": "Includes a controller and middleware that implements a request queue",
"keywords": [
"MetaMask",
Expand Down Expand Up @@ -42,7 +42,7 @@
"@metamask/approval-controller": "^5.1.2",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/network-controller": "^17.2.0",
"@metamask/selected-network-controller": "^7.0.1",
"@metamask/selected-network-controller": "^8.0.0",
"@types/jest": "^27.4.1",
"deepmerge": "^4.2.2",
"immer": "^9.0.6",
Expand All @@ -58,7 +58,7 @@
"peerDependencies": {
"@metamask/approval-controller": "^5.1.2",
"@metamask/network-controller": "^17.2.0",
"@metamask/selected-network-controller": "^7.0.1"
"@metamask/selected-network-controller": "^8.0.0"
},
"engines": {
"node": ">=16.0.0"
Expand Down
23 changes: 22 additions & 1 deletion packages/selected-network-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [8.0.0]

### Changed

- **BREAKING:** `setNetworkClientIdForDomain` now throws an error if passed `metamask` for the domain param ([#3908](https://github.com/MetaMask/core/pull/3908)).
- **BREAKING:** `setNetworkClientIdForDomain` now includes a check that the requesting `domain` has already been granted permissions in the `PermissionsController` before adding it to `domains` state and throws an error if the domain does not have permissions ([#3908](https://github.com/MetaMask/core/pull/3908)).
adonesky1 marked this conversation as resolved.
Show resolved Hide resolved
- **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)).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This in implementation detail heavy. To the end user, getNetworkClientIdForDomain will still passthrough the selectedNetworkClientId, so nothing should be different for the consumer? Do we have consumers accessing SelectedNetworkController state directly?

jiexi marked this conversation as resolved.
Show resolved Hide resolved
- **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)).
- **BREAKING:** `getProviderAndBlockTracker` now throws an error if called with a domain that is not in domains state ([#3908](https://github.com/MetaMask/core/pull/3908)).
jiexi marked this conversation as resolved.
Show resolved Hide resolved
- **BREAKING:** `getNetworkClientIdForDomain` now returns the `selectedNetworkClientId` for the globally selected network if the `perDomainNetwork` flag is false and if the domain is not in the `domains` state ([#3908](https://github.com/MetaMask/core/pull/3908)).
jiexi marked this conversation as resolved.
Show resolved Hide resolved

### Removed

- **BREAKING:** Remove logic in `selectedNetworkMiddleware` to set a default `networkClientId` for the requesting origin when not already set. Now if no `networkClientId` is already set for the requesting origin, the middleware will not add the origin to `domains` state but will add the `networkClientId` currently set for the `selectedNetworkClient` from the `NetworkController` to the request object ([#3908](https://github.com/MetaMask/core/pull/3908)).
jiexi marked this conversation as resolved.
Show resolved Hide resolved

### Fixed

- The `SelectedNetworkController` now listens for `networkConfiguration` removal events on the `NetworkController` and if a removed `networkClientId` matches the set `networkClientId` for any domains in its state, it updates them to the globally selected `networkClientId` and repoints the proxies accordingly.
jiexi marked this conversation as resolved.
Show resolved Hide resolved
([#3926](https://github.com/MetaMask/core/pull/3926))

## [7.0.1]

### Changed
Expand Down Expand Up @@ -106,7 +126,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initial Release ([#1643](https://github.com/MetaMask/core/pull/1643))

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@7.0.1...HEAD
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@8.0.0...HEAD
[8.0.0]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@7.0.1...@metamask/selected-network-controller@8.0.0
[7.0.1]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@7.0.0...@metamask/selected-network-controller@7.0.1
[7.0.0]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@6.0.0...@metamask/selected-network-controller@7.0.0
[6.0.0]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@5.0.0...@metamask/selected-network-controller@6.0.0
Expand Down
2 changes: 1 addition & 1 deletion packages/selected-network-controller/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/selected-network-controller",
"version": "7.0.1",
"version": "8.0.0",
"description": "Provides an interface to the currently selected networkClientId for a given domain",
"keywords": [
"MetaMask",
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2590,7 +2590,7 @@ __metadata:
"@metamask/json-rpc-engine": ^7.3.2
"@metamask/network-controller": ^17.2.0
"@metamask/rpc-errors": ^6.2.0
"@metamask/selected-network-controller": ^7.0.1
"@metamask/selected-network-controller": ^8.0.0
"@metamask/swappable-obj-proxy": ^2.2.0
"@metamask/utils": ^8.3.0
"@types/jest": ^27.4.1
Expand All @@ -2607,7 +2607,7 @@ __metadata:
peerDependencies:
"@metamask/approval-controller": ^5.1.2
"@metamask/network-controller": ^17.2.0
"@metamask/selected-network-controller": ^7.0.1
"@metamask/selected-network-controller": ^8.0.0
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -2662,7 +2662,7 @@ __metadata:
languageName: node
linkType: hard

"@metamask/selected-network-controller@^7.0.1, @metamask/selected-network-controller@workspace:packages/selected-network-controller":
"@metamask/selected-network-controller@^8.0.0, @metamask/selected-network-controller@workspace:packages/selected-network-controller":
version: 0.0.0-use.local
resolution: "@metamask/selected-network-controller@workspace:packages/selected-network-controller"
dependencies:
Expand Down
Loading