aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test/utils/token_utils.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2017-12-21 08:07:54 +0800
committerBrandon Millman <brandon.millman@gmail.com>2017-12-21 08:07:54 +0800
commit23052a5c2efdb51f8d991a5a3bd77b3c3cdc6a9a (patch)
tree12359f3dbefa5fc1948821ad53f21096730aad9c /packages/0x.js/test/utils/token_utils.ts
parentcb11aec84df346d5180c7d5874859c1c34f0bf1c (diff)
parent42b3a7c9d756dd2c68256707c0c96a95370329bd (diff)
downloaddexon-sol-tools-23052a5c2efdb51f8d991a5a3bd77b3c3cdc6a9a.tar
dexon-sol-tools-23052a5c2efdb51f8d991a5a3bd77b3c3cdc6a9a.tar.gz
dexon-sol-tools-23052a5c2efdb51f8d991a5a3bd77b3c3cdc6a9a.tar.bz2
dexon-sol-tools-23052a5c2efdb51f8d991a5a3bd77b3c3cdc6a9a.tar.lz
dexon-sol-tools-23052a5c2efdb51f8d991a5a3bd77b3c3cdc6a9a.tar.xz
dexon-sol-tools-23052a5c2efdb51f8d991a5a3bd77b3c3cdc6a9a.tar.zst
dexon-sol-tools-23052a5c2efdb51f8d991a5a3bd77b3c3cdc6a9a.zip
Merge branch 'development' into fix/underscorePrivate
* development: (29 commits) Move call to error reporter to end of handler so that even if reporting the error takes a while, it doesn't block the UI Update outdated WETH ranges Fix conditional Fix top-padding Publish Update CHANGELOGs Add slashes to base URLs Fix linter issue Fix WETH symbol Update snapshot and artifacts Replace our EtherTokens with WETH9 from maker Fix test description Fix a typo Add err==null assertions Add WETH9 tests Use the new snapshot including WETH9 and it's artifacts Add WETH9 and mirations Fix WETH events watching Fix a typo Init the _etherTokenContractsByAddress ...
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 bd66d81bf..e9a10d036 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);