From b7676d8c466db73527552d68eea71bd315a45b02 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 6 Feb 2018 17:23:27 -0800 Subject: Use isTestNetwork instead of isKovanTestNetwork on balances page except for Dharma integration --- packages/website/ts/components/token_balances.tsx | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'packages/website/ts/components') diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx index ea8144b7d..a25c8b077 100644 --- a/packages/website/ts/components/token_balances.tsx +++ b/packages/website/ts/components/token_balances.tsx @@ -176,13 +176,21 @@ export class TokenBalances extends React.Component, ]; + const isTestNetwork = _.includes( + [ + constants.NETWORK_ID_BY_NAME[Networks.Kovan], + constants.NETWORK_ID_BY_NAME[Networks.Rinkeby], + constants.NETWORK_ID_BY_NAME[Networks.Ropsten], + ], + this.props.networkId, + ); const isKovanTestNetwork = this.props.networkId === constants.NETWORK_ID_KOVAN; const dharmaButtonColumnStyle = { paddingLeft: 3, display: isKovanTestNetwork ? 'table-cell' : 'none', }; const stubColumnStyle = { - display: isKovanTestNetwork ? 'none' : 'table-cell', + display: isTestNetwork ? 'none' : 'table-cell', }; const allTokenRowHeight = _.size(this.props.tokenByAddress) * TOKEN_TABLE_ROW_HEIGHT; const tokenTableHeight = @@ -201,10 +209,10 @@ export class TokenBalances extends React.Component -

{isKovanTestNetwork ? 'Test ether' : 'Ether'}

+

{isTestNetwork ? 'Test ether' : 'Ether'}

- {isKovanTestNetwork + {isTestNetwork ? 'In order to try out the 0x Portal Dapp, request some test ether to pay for \ gas costs. It might take a bit of time for the test ether to show up.' : 'Ether must be converted to Ether Tokens in order to be tradable via 0x. \ @@ -216,7 +224,7 @@ export class TokenBalances extends React.ComponentCurrency Balance - {isKovanTestNetwork && ( + {isTestNetwork && ( {isSmallScreen ? 'Faucet' : 'Request from faucet'} @@ -243,7 +251,7 @@ export class TokenBalances extends React.Component - {isKovanTestNetwork && ( + {isTestNetwork && (
-

{isKovanTestNetwork ? 'Test tokens' : 'Tokens'}

+

{isTestNetwork ? 'Test tokens' : 'Tokens'}

@@ -282,7 +290,7 @@ export class TokenBalances extends React.Component
- {isKovanTestNetwork + {isTestNetwork ? "Mint some test tokens you'd like to use to generate or fill an order using 0x." : "Set trading permissions for a token you'd like to start trading."}
-- cgit