diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-06-15 06:50:46 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-06-15 06:50:46 +0800 |
commit | 2cc7289b7b3c3177230957ff2384c58bed4266f3 (patch) | |
tree | 21acfb995ece8753c25cb9e2cf0f05de86a1b16c /packages/website/ts/utils/utils.ts | |
parent | 81d6df925e430f2199ddef44b3ccd353e6c3c19b (diff) | |
parent | e7eb220c503118631a6b23071c71b4b55df5b5cf (diff) | |
download | dexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.tar dexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.tar.gz dexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.tar.bz2 dexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.tar.lz dexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.tar.xz dexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.tar.zst dexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.zip |
Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/portal-v2-analytics
Diffstat (limited to 'packages/website/ts/utils/utils.ts')
-rw-r--r-- | packages/website/ts/utils/utils.ts | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts index 651a4212a..fdee264b2 100644 --- a/packages/website/ts/utils/utils.ts +++ b/packages/website/ts/utils/utils.ts @@ -318,9 +318,18 @@ export const utils = { shouldShowPortalV2(): boolean { return this.isDevelopment() || this.isStaging() || this.isDogfood(); }, + shouldShowJobsPage(): boolean { + return this.isDevelopment() || this.isStaging() || this.isDogfood(); + }, getEthToken(tokenByAddress: TokenByAddress): Token { + return utils.getTokenBySymbol(constants.ETHER_TOKEN_SYMBOL, tokenByAddress); + }, + getZrxToken(tokenByAddress: TokenByAddress): Token { + return utils.getTokenBySymbol(constants.ZRX_TOKEN_SYMBOL, tokenByAddress); + }, + getTokenBySymbol(symbol: string, tokenByAddress: TokenByAddress): Token { const tokens = _.values(tokenByAddress); - const etherToken = _.find(tokens, { symbol: constants.ETHER_TOKEN_SYMBOL }); - return etherToken; + const token = _.find(tokens, { symbol }); + return token; }, }; |