diff --git a/app/components/UI/AccountOverview/index.js b/app/components/UI/AccountOverview/index.js
index 1dd7dabe046..c8ef66a0454 100644
--- a/app/components/UI/AccountOverview/index.js
+++ b/app/components/UI/AccountOverview/index.js
@@ -19,7 +19,6 @@ import Device from '../../../util/Device';
import { ANALYTICS_EVENT_OPTS } from '../../../util/analytics';
import { renderFiat } from '../../../util/number';
import { renderAccountName } from '../../../util/address';
-import { isMainNet } from '../../../util/networks';
import { getEther } from '../../../util/transactions';
import { isSwapsAllowed } from '../Swaps/utils';
@@ -336,7 +335,7 @@ class AccountOverview extends PureComponent {
)}
- {isMainNet(chainId) && {fiatBalance}}
+ {fiatBalance}
diff --git a/app/components/UI/AssetOverview/index.js b/app/components/UI/AssetOverview/index.js
index e1aa844b6ea..95115329774 100644
--- a/app/components/UI/AssetOverview/index.js
+++ b/app/components/UI/AssetOverview/index.js
@@ -12,7 +12,6 @@ import { toggleReceiveModal } from '../../../actions/modals';
import { connect } from 'react-redux';
import { renderFromTokenMinimalUnit, balanceToFiat, renderFromWei, weiToFiat, hexToBN } from '../../../util/number';
import { safeToChecksumAddress } from '../../../util/address';
-import { isMainNet } from '../../../util/networks';
import { getEther } from '../../../util/transactions';
import { newAssetTransaction } from '../../../actions/transaction';
import { isSwapsAllowed } from '../Swaps/utils';
@@ -256,16 +255,12 @@ class AssetOverview extends PureComponent {
let balance, balanceFiat;
if (isETH) {
balance = renderFromWei(accounts[selectedAddress] && accounts[selectedAddress].balance);
- balanceFiat = isMainNet(chainId)
- ? weiToFiat(hexToBN(accounts[selectedAddress].balance), conversionRate, currentCurrency)
- : null;
+ balanceFiat = weiToFiat(hexToBN(accounts[selectedAddress].balance), conversionRate, currentCurrency);
} else {
const exchangeRate = itemAddress in tokenExchangeRates ? tokenExchangeRates[itemAddress] : undefined;
balance =
itemAddress in tokenBalances ? renderFromTokenMinimalUnit(tokenBalances[itemAddress], decimals) : 0;
- balanceFiat = isMainNet(chainId)
- ? balanceToFiat(balance, conversionRate, exchangeRate, currentCurrency)
- : null;
+ balanceFiat = balanceToFiat(balance, conversionRate, exchangeRate, currentCurrency);
}
// choose balances depending on 'primaryCurrency'
if (primaryCurrency === 'ETH') {
diff --git a/app/components/UI/DrawerView/index.js b/app/components/UI/DrawerView/index.js
index 3a95a1b86a6..3d1e2a15172 100644
--- a/app/components/UI/DrawerView/index.js
+++ b/app/components/UI/DrawerView/index.js
@@ -8,7 +8,7 @@ import Icon from 'react-native-vector-icons/FontAwesome';
import FeatherIcon from 'react-native-vector-icons/Feather';
import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons';
import { colors, fontStyles } from '../../../styles/common';
-import { hasBlockExplorer, findBlockExplorerForRpc, getBlockExplorerName, isMainNet } from '../../../util/networks';
+import { hasBlockExplorer, findBlockExplorerForRpc, getBlockExplorerName } from '../../../util/networks';
import Identicon from '../Identicon';
import StyledButton from '../StyledButton';
import AccountList from '../AccountList';
@@ -337,10 +337,6 @@ class DrawerView extends PureComponent {
* Wizard onboarding state
*/
wizard: PropTypes.object,
- /**
- * Chain Id
- */
- chainId: PropTypes.string,
/**
* Current provider ticker
*/
@@ -849,7 +845,6 @@ class DrawerView extends PureComponent {
selectedAddress,
keyrings,
currentCurrency,
- chainId,
ticker,
seedphraseBackedUp
} = this.props;
@@ -896,7 +891,7 @@ class DrawerView extends PureComponent {
- {isMainNet(chainId) && {fiatBalanceStr}}
+ {fiatBalanceStr}
({
receiveModalVisible: state.modals.receiveModalVisible,
passwordSet: state.user.passwordSet,
wizard: state.wizard,
- chainId: state.engine.backgroundState.NetworkController.provider.chainId,
ticker: state.engine.backgroundState.NetworkController.provider.ticker,
tokens: state.engine.backgroundState.TokensController.tokens,
tokenBalances: state.engine.backgroundState.TokenBalancesController.contractBalances,
diff --git a/app/components/UI/Tokens/index.js b/app/components/UI/Tokens/index.js
index 961a7ee0fe1..85ee2e17dbf 100644
--- a/app/components/UI/Tokens/index.js
+++ b/app/components/UI/Tokens/index.js
@@ -17,7 +17,6 @@ import { ANALYTICS_EVENT_OPTS } from '../../../util/analytics';
import StyledButton from '../StyledButton';
import { allowedToBuy } from '../FiatOrders';
import NetworkMainAssetLogo from '../NetworkMainAssetLogo';
-import { isMainNet } from '../../../util/networks';
const styles = StyleSheet.create({
wrapper: {
@@ -167,23 +166,14 @@ class Tokens extends PureComponent {
);
renderItem = asset => {
- const {
- chainId,
- conversionRate,
- currentCurrency,
- tokenBalances,
- tokenExchangeRates,
- primaryCurrency
- } = this.props;
+ const { conversionRate, currentCurrency, tokenBalances, tokenExchangeRates, primaryCurrency } = this.props;
const itemAddress = safeToChecksumAddress(asset.address);
const logo = asset.logo || ((contractMap[itemAddress] && contractMap[itemAddress].logo) || undefined);
const exchangeRate = itemAddress in tokenExchangeRates ? tokenExchangeRates[itemAddress] : undefined;
const balance =
asset.balance ||
(itemAddress in tokenBalances ? renderFromTokenMinimalUnit(tokenBalances[itemAddress], asset.decimals) : 0);
- const balanceFiat = isMainNet(chainId)
- ? asset.balanceFiat || balanceToFiat(balance, conversionRate, exchangeRate, currentCurrency)
- : null;
+ const balanceFiat = asset.balanceFiat || balanceToFiat(balance, conversionRate, exchangeRate, currentCurrency);
const balanceValue = `${balance} ${asset.symbol}`;
// render balances according to primary currency
diff --git a/app/components/Views/SendFlow/Amount/index.js b/app/components/Views/SendFlow/Amount/index.js
index d3b0fc63b1b..54c290e57b8 100644
--- a/app/components/Views/SendFlow/Amount/index.js
+++ b/app/components/Views/SendFlow/Amount/index.js
@@ -783,7 +783,6 @@ class Amount extends PureComponent {
renderToken = (token, index) => {
const {
accounts,
- chainId,
selectedAddress,
conversionRate,
currentCurrency,
@@ -794,15 +793,11 @@ class Amount extends PureComponent {
const { address, decimals, symbol } = token;
if (token.isETH) {
balance = renderFromWei(accounts[selectedAddress].balance);
- balanceFiat = isMainNet(chainId)
- ? weiToFiat(hexToBN(accounts[selectedAddress].balance), conversionRate, currentCurrency)
- : null;
+ balanceFiat = weiToFiat(hexToBN(accounts[selectedAddress].balance), conversionRate, currentCurrency);
} else {
balance = renderFromTokenMinimalUnit(contractBalances[address], decimals);
const exchangeRate = contractExchangeRates[address];
- balanceFiat = isMainNet(chainId)
- ? balanceToFiat(balance, conversionRate, exchangeRate, currentCurrency)
- : null;
+ balanceFiat = balanceToFiat(balance, conversionRate, exchangeRate, currentCurrency);
}
return (