generated from MetaMask/metamask-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
Description
@metamask/network-controller 20.0.0 removed providerConfig from state, which means that we now need to use selectedNetworkClientId to access the chain ID for the currently selected network. Currently there is one instance of this in the constructor. Once we make that change, we no longer need to take provider, because we can get this from the network client object.
This is a prerequisite for upgrading to BaseController v2.
Acceptance Criteria
- Constructor no longer takes
onNetworkStateChange, but subscribes toNetworkController:stateChangeinstead, feedingselectedNetworkClientIdtoNetworkController:getNetworkClientByIdand accessing the chain ID through the network client. - Constructor no longer takes
provider, but usesNetworkController:getNetworkClientByIdto access the provider from the current network client.
Reactions are currently unavailable