Initialize network controller provider chainId to the appropriate default networks (#9999)

feature/default_network_editable
Thomas Huang 4 years ago committed by GitHub
parent 4839e31e05
commit 26272d3557
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      app/scripts/controllers/network/network.js

@ -19,6 +19,8 @@ import {
MAINNET, MAINNET,
INFURA_PROVIDER_TYPES, INFURA_PROVIDER_TYPES,
NETWORK_TYPE_TO_ID_MAP, NETWORK_TYPE_TO_ID_MAP,
MAINNET_CHAIN_ID,
RINKEBY_CHAIN_ID,
} from './enums' } from './enums'
const env = process.env.METAMASK_ENV const env = process.env.METAMASK_ENV
@ -32,9 +34,9 @@ if (process.env.IN_TEST === 'true') {
nickname: 'Localhost 8545', nickname: 'Localhost 8545',
} }
} else if (process.env.METAMASK_DEBUG || env === 'test') { } else if (process.env.METAMASK_DEBUG || env === 'test') {
defaultProviderConfigOpts = { type: RINKEBY } defaultProviderConfigOpts = { type: RINKEBY, chainId: RINKEBY_CHAIN_ID }
} else { } else {
defaultProviderConfigOpts = { type: MAINNET } defaultProviderConfigOpts = { type: MAINNET, chainId: MAINNET_CHAIN_ID }
} }
const defaultProviderConfig = { const defaultProviderConfig = {

Loading…
Cancel
Save