Skip to content

Release/118.0.0 - #3958

Merged
adonesky1 merged 11 commits into
mainfrom
release/118.0.0
Feb 22, 2024
Merged

Release/118.0.0#3958
adonesky1 merged 11 commits into
mainfrom
release/118.0.0

Conversation

@adonesky1

@adonesky1adonesky1 commented Feb 22, 2024

Copy link
Copy Markdown
Contributor

@metamask/selected-network-controller

[8.0.0]

Changed

  • BREAKING:setNetworkClientIdForDomain now throws an error if passed metamask as its first (domain) argument (#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).
  • 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).
  • 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).
  • BREAKING:getProviderAndBlockTracker now throws an error if called with a domain that is not in domains state (#3908).
  • 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).

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).

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.
    (#3926)

@adonesky1
adonesky1 marked this pull request as ready for review February 22, 2024 16:33
@adonesky1
adonesky1 requested a review from a team as a code ownerFebruary 22, 2024 16:33
@adonesky1
adonesky1force-pushed the release/118.0.0 branch 3 times, most recently from 723d0a5 to fc90b6fCompareFebruary 22, 2024 16:58
Comment threadpackages/selected-network-controller/CHANGELOG.md Outdated
Co-authored-by: jiexi <jiexiluan@gmail.com>
BelfordZ
BelfordZ previously approved these changes Feb 22, 2024
mcmire
mcmire previously approved these changes Feb 22, 2024

@mcmiremcmire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One nit but looks good either way! Great changelog entries.

Comment threadpackages/selected-network-controller/CHANGELOG.md Outdated

@jiexijiexi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

QueuedRequestController also needs to be bumped a major

Comment threadpackages/selected-network-controller/CHANGELOG.md Outdated

- **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)).
- **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
Copy Markdown
Member

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?

Comment threadpackages/selected-network-controller/CHANGELOG.md Outdated
Comment threadpackages/selected-network-controller/CHANGELOG.md Outdated
Comment threadpackages/selected-network-controller/CHANGELOG.md Outdated
Comment threadpackages/selected-network-controller/CHANGELOG.md Outdated
@adonesky1
adonesky1 dismissed stale reviews from mcmire and BelfordZ via 331cdc3February 22, 2024 17:31
@adonesky1
adonesky1 merged commit aa3a16b into mainFeb 22, 2024
@adonesky1
adonesky1 deleted the release/118.0.0 branch February 22, 2024 17:50
mcmire added a commit that referenced this pull request Mar 6, 2024
`@metamask/queued-request-controller` was bumped to 0.5.0 in [release
118.0](#3958), but changes that
took place since 0.4.0 were not included in the changelog for that
release. This commit corrects this.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@adonesky1@mcmire@jiexi@BelfordZ