aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils
diff options
context:
space:
mode:
authorFrancesco Agosti <francesco.agosti93@gmail.com>2018-06-15 05:41:42 +0800
committerGitHub <noreply@github.com>2018-06-15 05:41:42 +0800
commite7eb220c503118631a6b23071c71b4b55df5b5cf (patch)
tree3eef31cad2d42ac8c5c2ec644503aa03e018d1fe /packages/website/ts/utils
parent0e354e5ea1f9951088331a310999bf87c8f8f4b3 (diff)
parent7d6700582006d201f8757107b4cf286bb0ee5661 (diff)
downloaddexon-sol-tools-e7eb220c503118631a6b23071c71b4b55df5b5cf.tar
dexon-sol-tools-e7eb220c503118631a6b23071c71b4b55df5b5cf.tar.gz
dexon-sol-tools-e7eb220c503118631a6b23071c71b4b55df5b5cf.tar.bz2
dexon-sol-tools-e7eb220c503118631a6b23071c71b4b55df5b5cf.tar.lz
dexon-sol-tools-e7eb220c503118631a6b23071c71b4b55df5b5cf.tar.xz
dexon-sol-tools-e7eb220c503118631a6b23071c71b4b55df5b5cf.tar.zst
dexon-sol-tools-e7eb220c503118631a6b23071c71b4b55df5b5cf.zip
Merge pull request #695 from 0xProject/feature/website/onboarding-flow-allowances
Implement allowances and final "congrats" onboarding flow step
Diffstat (limited to 'packages/website/ts/utils')
-rw-r--r--packages/website/ts/utils/utils.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index eb384fbb4..fdee264b2 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -322,8 +322,14 @@ export const utils = {
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;
},
};