Skip to content

Commit

Permalink
Use the networkController instead of preferencesController (#20127)
Browse files Browse the repository at this point in the history
* listen for the networkController instead of preferencesController

* type of networkConfigurations is an object

* typo fix

* prettier
  • Loading branch information
zone-live authored Jul 24, 2023
1 parent 737173e commit 13faeea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/scripts/controllers/mmi-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
];
Expand Down

0 comments on commit 13faeea

Please sign in to comment.