aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/token_utils.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-13 11:17:18 +0800
committerFabio Berger <me@fabioberger.com>2017-11-13 11:17:18 +0800
commitc4ee2d73865a1444c079b9e2836b7630a0adf03e (patch)
treeb9c7794e7022fb189675d914f5fe58dcabd67dec /test/utils/token_utils.ts
parenta74ec0effa818a86233fe64cb0dad2c61bbb4bb6 (diff)
downloaddexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.tar
dexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.tar.gz
dexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.tar.bz2
dexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.tar.lz
dexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.tar.xz
dexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.tar.zst
dexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.zip
Switch over to Lerna + Yarn Workspaces setup for a mono-repo approach
Diffstat (limited to 'test/utils/token_utils.ts')
-rw-r--r--test/utils/token_utils.ts24
1 files changed, 0 insertions, 24 deletions
diff --git a/test/utils/token_utils.ts b/test/utils/token_utils.ts
deleted file mode 100644
index 51cb9411c..000000000
--- a/test/utils/token_utils.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import * as _ from 'lodash';
-import {Token, InternalZeroExError} from '../../src/types';
-
-const PROTOCOL_TOKEN_SYMBOL = 'ZRX';
-
-export class TokenUtils {
- private tokens: Token[];
- constructor(tokens: Token[]) {
- this.tokens = tokens;
- }
- public getProtocolTokenOrThrow(): Token {
- const zrxToken = _.find(this.tokens, {symbol: PROTOCOL_TOKEN_SYMBOL});
- if (_.isUndefined(zrxToken)) {
- throw new Error(InternalZeroExError.ZrxNotInTokenRegistry);
- }
- return zrxToken;
- }
- public getNonProtocolTokens(): Token[] {
- const nonProtocolTokens = _.filter(this.tokens, token => {
- return token.symbol !== PROTOCOL_TOKEN_SYMBOL;
- });
- return nonProtocolTokens;
- }
-}