aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test/utils/token_utils.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-12-20 22:33:15 +0800
committerGitHub <noreply@github.com>2017-12-20 22:33:15 +0800
commite88b01ed5b5253d07eb9b51d48c895995eaec988 (patch)
treec6a1561dd9db2f02d52a0fb2af879aad94bfbd98 /packages/0x.js/test/utils/token_utils.ts
parent972e1675f6490bc10e8d9fd64cce2f7945cd4840 (diff)
parent3e3587c2811ed2078aa821490f446c24c9ab5eec (diff)
downloaddexon-0x-contracts-e88b01ed5b5253d07eb9b51d48c895995eaec988.tar
dexon-0x-contracts-e88b01ed5b5253d07eb9b51d48c895995eaec988.tar.gz
dexon-0x-contracts-e88b01ed5b5253d07eb9b51d48c895995eaec988.tar.bz2
dexon-0x-contracts-e88b01ed5b5253d07eb9b51d48c895995eaec988.tar.lz
dexon-0x-contracts-e88b01ed5b5253d07eb9b51d48c895995eaec988.tar.xz
dexon-0x-contracts-e88b01ed5b5253d07eb9b51d48c895995eaec988.tar.zst
dexon-0x-contracts-e88b01ed5b5253d07eb9b51d48c895995eaec988.zip
Merge pull request #277 from 0xProject/feature/weth-events
Add etherToken.getLogsAsync and etherToken.subscribe with tests
Diffstat (limited to 'packages/0x.js/test/utils/token_utils.ts')
-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);