diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-05-30 08:57:22 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-05-30 08:57:22 +0800 |
commit | b14c3fe48dc8eb5bad6eefceac872754eec34ffe (patch) | |
tree | 4b151a99b892d8adf3c53418c3a1b03600da87bc /packages/website/ts/utils | |
parent | bc28a08dd0d4db99549122fb4912b4931a3aad78 (diff) | |
download | dexon-sol-tools-b14c3fe48dc8eb5bad6eefceac872754eec34ffe.tar dexon-sol-tools-b14c3fe48dc8eb5bad6eefceac872754eec34ffe.tar.gz dexon-sol-tools-b14c3fe48dc8eb5bad6eefceac872754eec34ffe.tar.bz2 dexon-sol-tools-b14c3fe48dc8eb5bad6eefceac872754eec34ffe.tar.lz dexon-sol-tools-b14c3fe48dc8eb5bad6eefceac872754eec34ffe.tar.xz dexon-sol-tools-b14c3fe48dc8eb5bad6eefceac872754eec34ffe.tar.zst dexon-sol-tools-b14c3fe48dc8eb5bad6eefceac872754eec34ffe.zip |
Onboarding: implement add ETH step, and stub for add WETH step
Diffstat (limited to 'packages/website/ts/utils')
-rw-r--r-- | packages/website/ts/utils/constants.ts | 3 | ||||
-rw-r--r-- | packages/website/ts/utils/utils.ts | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/packages/website/ts/utils/constants.ts b/packages/website/ts/utils/constants.ts index f8710b349..9dc1d492c 100644 --- a/packages/website/ts/utils/constants.ts +++ b/packages/website/ts/utils/constants.ts @@ -4,6 +4,9 @@ import { BigNumber } from '@0xproject/utils'; export const constants = { DECIMAL_PLACES_ETH: 18, DECIMAL_PLACES_ZRX: 18, + ETHER_TOKEN_SYMBOL: 'WETH', + ZRX_TOKEN_SYMBOL: 'ZRX', + ETHER_SYMBOL: 'ETH', GENESIS_ORDER_BLOCK_BY_NETWORK_ID: { 1: 4145578, 42: 3117574, diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts index c0d055070..b9d962b75 100644 --- a/packages/website/ts/utils/utils.ts +++ b/packages/website/ts/utils/utils.ts @@ -321,4 +321,9 @@ export const utils = { shouldShowPortalV2(): boolean { return this.isDevelopment() || this.isStaging() || this.isDogfood(); }, + getEthToken(tokenByAddress: TokenByAddress): Token { + const tokens = _.values(tokenByAddress); + const etherToken = _.find(tokens, { symbol: constants.ETHER_TOKEN_SYMBOL }); + return etherToken; + }, }; |