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

Use selected network controller for Snaps #4602

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Aug 13, 2024

Explanation

This removes some checks in the SelectedNetworkController which disallow a Snap from using their own network, and default to the globally selected network. After this change, Snaps will be able to select their own network just like websites.

References

Related to MetaMask/MetaMask-planning#2938.

Changelog

@metamask/selected-network-controller

  • CHANGED: Allow Snaps to change own network

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

@Mrtenz
Copy link
Member Author

Mrtenz commented Aug 13, 2024

@metamaskbot publish-preview

Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "18.0.0-preview-55328a6",
  "@metamask-previews/address-book-controller": "5.0.0-preview-55328a6",
  "@metamask-previews/announcement-controller": "7.0.0-preview-55328a6",
  "@metamask-previews/approval-controller": "7.0.2-preview-55328a6",
  "@metamask-previews/assets-controllers": "37.0.0-preview-55328a6",
  "@metamask-previews/base-controller": "6.0.2-preview-55328a6",
  "@metamask-previews/build-utils": "3.0.0-preview-55328a6",
  "@metamask-previews/chain-controller": "0.1.1-preview-55328a6",
  "@metamask-previews/composable-controller": "7.0.0-preview-55328a6",
  "@metamask-previews/controller-utils": "11.0.2-preview-55328a6",
  "@metamask-previews/ens-controller": "13.0.1-preview-55328a6",
  "@metamask-previews/eth-json-rpc-provider": "4.1.2-preview-55328a6",
  "@metamask-previews/gas-fee-controller": "19.0.1-preview-55328a6",
  "@metamask-previews/json-rpc-engine": "9.0.2-preview-55328a6",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.2-preview-55328a6",
  "@metamask-previews/keyring-controller": "17.1.2-preview-55328a6",
  "@metamask-previews/logging-controller": "5.0.0-preview-55328a6",
  "@metamask-previews/message-manager": "10.0.2-preview-55328a6",
  "@metamask-previews/name-controller": "8.0.0-preview-55328a6",
  "@metamask-previews/network-controller": "20.1.0-preview-55328a6",
  "@metamask-previews/notification-controller": "6.0.0-preview-55328a6",
  "@metamask-previews/notification-services-controller": "0.2.1-preview-55328a6",
  "@metamask-previews/permission-controller": "11.0.0-preview-55328a6",
  "@metamask-previews/permission-log-controller": "3.0.0-preview-55328a6",
  "@metamask-previews/phishing-controller": "10.1.1-preview-55328a6",
  "@metamask-previews/polling-controller": "9.0.1-preview-55328a6",
  "@metamask-previews/preferences-controller": "13.0.1-preview-55328a6",
  "@metamask-previews/profile-sync-controller": "0.2.1-preview-55328a6",
  "@metamask-previews/queued-request-controller": "4.0.0-preview-55328a6",
  "@metamask-previews/rate-limit-controller": "6.0.0-preview-55328a6",
  "@metamask-previews/selected-network-controller": "17.0.0-preview-55328a6",
  "@metamask-previews/signature-controller": "18.0.1-preview-55328a6",
  "@metamask-previews/transaction-controller": "35.1.0-preview-55328a6",
  "@metamask-previews/user-operation-controller": "14.0.1-preview-55328a6"
}

adonesky1 added a commit to MetaMask/metamask-extension that referenced this pull request Aug 23, 2024
adonesky1 added a commit to MetaMask/metamask-mobile that referenced this pull request Aug 24, 2024
adonesky1 added a commit to MetaMask/metamask-mobile that referenced this pull request Aug 27, 2024
adonesky1 added a commit to MetaMask/metamask-mobile that referenced this pull request Aug 28, 2024
adonesky1 added a commit to MetaMask/metamask-mobile that referenced this pull request Sep 4, 2024
adonesky1 added a commit to MetaMask/metamask-mobile that referenced this pull request Sep 11, 2024
Sign up for free to 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.

1 participant