diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 0bee9d1c33d8..61a39e6ca0c3 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -1561,9 +1561,12 @@ export default class MetamaskController extends EventEmitter { this.txController.txGasUtil, ), networkController: this.networkController, + // This handler is misnamed. We must listen to networkDidChange + // to ensure the network provider has been set by the time we + // try to use it in this controller onNetworkStateChange: networkControllerMessenger.subscribe.bind( networkControllerMessenger, - 'NetworkController:stateChange', + 'NetworkController:networkDidChange', ), provider: this.provider, getProviderConfig: () => this.networkController.state.providerConfig,