diff options
Diffstat (limited to 'test/utils/token_utils.ts')
-rw-r--r-- | test/utils/token_utils.ts | 24 |
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; - } -} |