aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test/utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-19 21:15:14 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-20 21:01:59 +0800
commit613fada49f9d168fb949a370b884367f99deb401 (patch)
tree693354e8edb716a0a35e0a39e79267288c0b782a /packages/0x.js/test/utils
parentb603197ae837dca86d712760f9b18f626628096a (diff)
downloaddexon-sol-tools-613fada49f9d168fb949a370b884367f99deb401.tar
dexon-sol-tools-613fada49f9d168fb949a370b884367f99deb401.tar.gz
dexon-sol-tools-613fada49f9d168fb949a370b884367f99deb401.tar.bz2
dexon-sol-tools-613fada49f9d168fb949a370b884367f99deb401.tar.lz
dexon-sol-tools-613fada49f9d168fb949a370b884367f99deb401.tar.xz
dexon-sol-tools-613fada49f9d168fb949a370b884367f99deb401.tar.zst
dexon-sol-tools-613fada49f9d168fb949a370b884367f99deb401.zip
Add etherToken.getLogsAsync and etherToken.subscribe with tests
Diffstat (limited to 'packages/0x.js/test/utils')
-rw-r--r--packages/0x.js/test/utils/token_utils.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/0x.js/test/utils/token_utils.ts b/packages/0x.js/test/utils/token_utils.ts
index 4634899a7..7da7f466c 100644
--- a/packages/0x.js/test/utils/token_utils.ts
+++ b/packages/0x.js/test/utils/token_utils.ts
@@ -17,6 +17,13 @@ export class TokenUtils {
}
return zrxToken;
}
+ public getWethTokenOrThrow(): Token {
+ const wethToken = _.find(this.tokens, {symbol: WETH_TOKEN_SYMBOL});
+ if (_.isUndefined(wethToken)) {
+ throw new Error(InternalZeroExError.WethNotInTokenRegistry);
+ }
+ return wethToken;
+ }
public getDummyTokens(): Token[] {
const dummyTokens = _.filter(this.tokens, token => {
return !_.includes([PROTOCOL_TOKEN_SYMBOL, WETH_TOKEN_SYMBOL], token.symbol);