Skip to content

Remove providerConfig from NetworkController #4185

Description

@mcmire

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

team-wallet-frameworkDeprecated: Please use `team-core-platform` instead.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions