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

Remove providerConfig from NetworkController #4185

Open
12 tasks done
mcmire opened this issue Apr 18, 2024 · 0 comments · May be fixed by #4254
Open
12 tasks done

Remove providerConfig from NetworkController #4185

mcmire opened this issue Apr 18, 2024 · 0 comments · May be fixed by #4254
Assignees

Comments

@mcmire
Copy link
Contributor

mcmire commented Apr 18, 2024

Historically, the providerConfig property in NetworkController has been used to switch and track the currently selected network as well as provide access to information about that network. That is now achieved with a combination of the selectedNetworkClientId and networkConfigurations properties as well as the configuration property on the NetworkClient interface. This means that we no longer need providerConfig and we can remove this redundant state.

Removing providerConfig is one thing, but there are also a ton of packages which make use of this property to access the currently selected chain, and we would want to make use of selectedNetworkClientId in combination with the NetworkController:getNetworkClientById action to do this instead.

Acceptance Criteria

  • providerConfig is removed from NetworkController (replaced with selectedNetworkClientId and/or `networkConfigurations); NetworkController tests pass
  • [assets-controllers] AccountTrackerController is updated to follow suit and tests pass
  • [assets-controllers] AssetsContractController is updated to follow suit and tests pass
  • [assets-controllers] NftController is updated to follow suit and tests pass
  • [assets-controllers] NftDetectionController is updated to follow suit and tests pass
  • [assets-controllers] TokensController is updated to follow suit and tests pass
  • [assets-controllers] TokenListController is updated to follow suit and tests pass
  • [assets-controllers] TokenRatesController is updated to follow suit and tests pass
  • EnsController is updated to follow suit and tests pass
  • GasFeeController is updated to follow suit and tests pass
  • SelectedNetworkController tests are updated to follow suit and tests pass
  • TransactionController is updated to follow suit and tests pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant