mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
Make _setProviderConfig
async (#18600)
The network controller internal method `_setProviderConfig` has been made async, the async `_switchNetwork` operation is now `await`-ed. Since the `_switchNetwork` call was the last operation, this has zero functional impact. Relates to https://github.com/MetaMask/metamask-extension/issues/18587
This commit is contained in:
parent
b9ff4e8798
commit
e6d1b052f0
@ -866,10 +866,10 @@ export class NetworkController extends EventEmitter {
|
||||
*
|
||||
* @param providerConfig - The provider configuration.
|
||||
*/
|
||||
_setProviderConfig(providerConfig: ProviderConfiguration): void {
|
||||
async _setProviderConfig(providerConfig: ProviderConfiguration) {
|
||||
this.#previousProviderConfig = this.providerStore.getState();
|
||||
this.providerStore.putState(providerConfig);
|
||||
this._switchNetwork(providerConfig);
|
||||
await this._switchNetwork(providerConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user