mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Use the networkController instead of preferencesController (#20127)
* listen for the networkController instead of preferencesController * type of networkConfigurations is an object * typo fix * prettier
This commit is contained in:
parent
737173ed5a
commit
13faeeac2b
@ -542,8 +542,13 @@ export default class MMIController extends EventEmitter {
|
||||
const getAccountDetails = (address) =>
|
||||
this.custodyController.getAccountDetails(address);
|
||||
const extensionId = this.extension.runtime.id;
|
||||
|
||||
const { networkConfigurations: networkConfigurationsById } =
|
||||
this.networkController.state;
|
||||
const networkConfigurations = Object.values(networkConfigurationsById);
|
||||
|
||||
const networks = [
|
||||
...this.preferencesController.getRpcMethodPreferences(),
|
||||
...networkConfigurations,
|
||||
{ chainId: CHAIN_IDS.MAINNET },
|
||||
{ chainId: CHAIN_IDS.GOERLI },
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user