diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2017-12-21 08:07:54 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2017-12-21 08:07:54 +0800 |
commit | 23052a5c2efdb51f8d991a5a3bd77b3c3cdc6a9a (patch) | |
tree | 12359f3dbefa5fc1948821ad53f21096730aad9c /packages/0x.js/test/utils | |
parent | cb11aec84df346d5180c7d5874859c1c34f0bf1c (diff) | |
parent | 42b3a7c9d756dd2c68256707c0c96a95370329bd (diff) | |
download | dexon-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')
-rw-r--r-- | packages/0x.js/test/utils/constants.ts | 6 | ||||
-rw-r--r-- | packages/0x.js/test/utils/token_utils.ts | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/packages/0x.js/test/utils/constants.ts b/packages/0x.js/test/utils/constants.ts index d486da581..7b6b2ee7b 100644 --- a/packages/0x.js/test/utils/constants.ts +++ b/packages/0x.js/test/utils/constants.ts @@ -1,11 +1,11 @@ export const constants = { NULL_ADDRESS: '0x0000000000000000000000000000000000000000', - RPC_URL: 'http://localhost:8545', + RPC_URL: 'http://localhost:8545/', ROPSTEN_NETWORK_ID: 3, KOVAN_NETWORK_ID: 42, TESTRPC_NETWORK_ID: 50, - KOVAN_RPC_URL: 'https://kovan.infura.io', - ROPSTEN_RPC_URL: 'https://ropsten.infura.io', + KOVAN_RPC_URL: 'https://kovan.infura.io/', + ROPSTEN_RPC_URL: 'https://ropsten.infura.io/', ZRX_DECIMALS: 18, GAS_ESTIMATE: 500000, }; 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); |