diff --git a/app/components/UI/TransactionHeader/__snapshots__/index.test.js.snap b/app/components/UI/TransactionHeader/__snapshots__/index.test.js.snap index 3d8cc8a0886..ae54f31732e 100644 --- a/app/components/UI/TransactionHeader/__snapshots__/index.test.js.snap +++ b/app/components/UI/TransactionHeader/__snapshots__/index.test.js.snap @@ -100,7 +100,7 @@ exports[`TransactionHeader should render correctly 1`] = ` } } > - ropsten + Ropsten diff --git a/app/components/UI/TransactionHeader/index.js b/app/components/UI/TransactionHeader/index.js index 2e7b86c09b7..8cb8b0f6ea4 100644 --- a/app/components/UI/TransactionHeader/index.js +++ b/app/components/UI/TransactionHeader/index.js @@ -5,6 +5,7 @@ import { colors, fontStyles } from '../../../styles/common'; import { connect } from 'react-redux'; import WebsiteIcon from '../WebsiteIcon'; import { getHost, getUrlObj } from '../../../util/browser'; +import networkList from '../../../util/networks'; import FontAwesome from 'react-native-vector-icons/FontAwesome'; const styles = StyleSheet.create({ @@ -115,6 +116,7 @@ class TransactionHeader extends PureComponent { networkType } = this.props; const title = getHost(url); + const networkName = networkList[networkType].shortName; return ( @@ -124,7 +126,7 @@ class TransactionHeader extends PureComponent { {this.renderNetworkStatusIndicator()} - {networkType === 'mainnet' ? 'Ethereum' : networkType} + {networkName} ); diff --git a/app/util/networks.js b/app/util/networks.js index 6a5b6084ff6..ef5cdd1dc26 100644 --- a/app/util/networks.js +++ b/app/util/networks.js @@ -11,36 +11,42 @@ import URL from 'url-parse'; const NetworkList = { mainnet: { name: 'Ethereum Main Network', + shortName: 'Ethereum', networkId: 1, chainId: 1, color: '#3cc29e' }, ropsten: { name: 'Ropsten Test Network', + shortName: 'Ropsten', networkId: 3, chainId: 3, color: '#ff4a8d' }, kovan: { name: 'Kovan Test Network', + shortName: 'Kovan', networkId: 42, chainId: 42, color: '#7057ff' }, rinkeby: { name: 'Rinkeby Test Network', + shortName: 'Rinkeby', networkId: 4, chainId: 4, color: '#f6c343' }, goerli: { name: 'Goerli Test Network', + shortName: 'Goerli', networkId: 5, chainId: 5, color: '#3099f2' }, rpc: { name: 'Private Network', + shortName: 'Private', color: colors.grey000 } };