aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test/utils/token_utils.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-14 22:31:37 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-14 22:47:03 +0800
commit28c409fc6d635ee8ed1430d97d9bbdde2f613e37 (patch)
tree419b94ff1d080c279ebe0ce94a87a42aeb20f746 /packages/0x.js/test/utils/token_utils.ts
parent449a04d39ce49ac06e0de989dcbefe6f4a7d2e84 (diff)
downloaddexon-0x-contracts-28c409fc6d635ee8ed1430d97d9bbdde2f613e37.tar.gz
dexon-0x-contracts-28c409fc6d635ee8ed1430d97d9bbdde2f613e37.tar.zst
dexon-0x-contracts-28c409fc6d635ee8ed1430d97d9bbdde2f613e37.zip
Add a function to init token balances
Diffstat (limited to 'packages/0x.js/test/utils/token_utils.ts')
-rw-r--r--packages/0x.js/test/utils/token_utils.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/0x.js/test/utils/token_utils.ts b/packages/0x.js/test/utils/token_utils.ts
index 9c20f52a1..4634899a7 100644
--- a/packages/0x.js/test/utils/token_utils.ts
+++ b/packages/0x.js/test/utils/token_utils.ts
@@ -3,6 +3,7 @@ import * as _ from 'lodash';
import {InternalZeroExError, Token} from '../../src/types';
const PROTOCOL_TOKEN_SYMBOL = 'ZRX';
+const WETH_TOKEN_SYMBOL = 'WETH';
export class TokenUtils {
private tokens: Token[];
@@ -16,10 +17,10 @@ export class TokenUtils {
}
return zrxToken;
}
- public getNonProtocolTokens(): Token[] {
- const nonProtocolTokens = _.filter(this.tokens, token => {
- return token.symbol !== PROTOCOL_TOKEN_SYMBOL;
+ public getDummyTokens(): Token[] {
+ const dummyTokens = _.filter(this.tokens, token => {
+ return !_.includes([PROTOCOL_TOKEN_SYMBOL, WETH_TOKEN_SYMBOL], token.symbol);
});
- return nonProtocolTokens;
+ return dummyTokens;
}
}