diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js b/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js index 8dc7c86ab..100e30780 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js +++ b/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js @@ -78,6 +78,7 @@ describe('gas-modal-page-container container', function () { }, provider: { type: 'mainnet', + chainId: '0x1', }, currentNetworkTxList: [ { @@ -200,6 +201,7 @@ describe('gas-modal-page-container container', function () { provider: { ...baseMockState.metamask.provider, type: 'rinkeby', + chainId: '0x4', }, }, }, @@ -225,6 +227,7 @@ describe('gas-modal-page-container container', function () { provider: { ...baseMockState.metamask.provider, type: 'rinkeby', + chainId: '0x4', }, }, }, @@ -246,6 +249,7 @@ describe('gas-modal-page-container container', function () { provider: { ...baseMockState.metamask.provider, type: 'mainnet', + chainId: '0x1', }, }, }, diff --git a/ui/app/components/app/token-cell/token-cell.test.js b/ui/app/components/app/token-cell/token-cell.test.js index 677102418..9694e188c 100644 --- a/ui/app/components/app/token-cell/token-cell.test.js +++ b/ui/app/components/app/token-cell/token-cell.test.js @@ -23,7 +23,7 @@ describe('Token Cell', function () { conversionRate: 7.0, preferences: {}, provider: { - chainId: '1', + chainId: '0x1', ticker: 'ETH', type: 'mainnet', }, diff --git a/ui/app/components/ui/currency-input/tests/currency-input.container.test.js b/ui/app/components/ui/currency-input/tests/currency-input.container.test.js index ccb5bb6d0..a0858288a 100644 --- a/ui/app/components/ui/currency-input/tests/currency-input.container.test.js +++ b/ui/app/components/ui/currency-input/tests/currency-input.container.test.js @@ -29,6 +29,7 @@ describe('CurrencyInput container', function () { }, provider: { type: 'mainnet', + chainId: '0x1', }, }, }, diff --git a/ui/app/selectors/selectors.js b/ui/app/selectors/selectors.js index 2be4a273f..46ac30393 100644 --- a/ui/app/selectors/selectors.js +++ b/ui/app/selectors/selectors.js @@ -2,7 +2,7 @@ import { stripHexPrefix } from 'ethereumjs-util'; import { createSelector } from 'reselect'; import { addHexPrefix } from '../../../app/scripts/lib/util'; import { - MAINNET, + MAINNET_CHAIN_ID, TEST_CHAINS, NETWORK_TYPE_RPC, } from '../../../shared/constants/network'; @@ -289,8 +289,8 @@ function getSuggestedTokenCount(state) { } export function getIsMainnet(state) { - const networkType = getNetworkIdentifier(state); - return networkType === MAINNET; + const chainId = getCurrentChainId(state); + return chainId === MAINNET_CHAIN_ID; } export function getIsTestnet(state) { diff --git a/ui/app/selectors/tests/custom-gas.test.js b/ui/app/selectors/tests/custom-gas.test.js index e0a94eaf5..020648fbd 100644 --- a/ui/app/selectors/tests/custom-gas.test.js +++ b/ui/app/selectors/tests/custom-gas.test.js @@ -55,6 +55,7 @@ describe('custom-gas selectors', function () { }, provider: { type: 'mainnet', + chainId: '0x1', }, }, gas: { @@ -105,6 +106,7 @@ describe('custom-gas selectors', function () { }, provider: { type: 'mainnet', + chainId: '0x1', }, }, gas: { @@ -155,6 +157,7 @@ describe('custom-gas selectors', function () { }, provider: { type: 'rinkeby', + chainId: '0x4', }, }, gas: { @@ -205,6 +208,7 @@ describe('custom-gas selectors', function () { }, provider: { type: 'rinkeby', + chainId: '0x4', }, }, gas: { @@ -249,6 +253,7 @@ describe('custom-gas selectors', function () { }, provider: { type: 'mainnet', + chainId: '0x1', }, }, gas: { @@ -310,6 +315,7 @@ describe('custom-gas selectors', function () { }, provider: { type: 'mainnet', + chainId: '0x1', }, }, gas: { @@ -354,6 +360,7 @@ describe('custom-gas selectors', function () { }, provider: { type: 'mainnet', + chainId: '0x1', }, }, gas: { @@ -404,6 +411,7 @@ describe('custom-gas selectors', function () { }, provider: { type: 'rinkeby', + chainId: '0x4', }, }, gas: { @@ -454,6 +462,7 @@ describe('custom-gas selectors', function () { }, provider: { type: 'rinkeby', + chainId: '0x4', }, }, gas: { @@ -498,6 +507,7 @@ describe('custom-gas selectors', function () { }, provider: { type: 'mainnet', + chainId: '0x1', }, }, gas: {