diff options
author | Fabio Berger <me@fabioberger.com> | 2018-02-24 06:15:29 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-02-24 06:15:29 +0800 |
commit | 10aed4606223fc558d9c7f6d98ff11fa7ba393e4 (patch) | |
tree | 6b0839b41eb3708a6ee254294e4774984b3af29e /packages/0x.js/src/0x.ts | |
parent | 6e43e89b2d6679def241c5014fc08202f74550b2 (diff) | |
parent | 10c0c0b6d2fce2a08858cd7ec280ed72d3da0b32 (diff) | |
download | dexon-sol-tools-10aed4606223fc558d9c7f6d98ff11fa7ba393e4.tar dexon-sol-tools-10aed4606223fc558d9c7f6d98ff11fa7ba393e4.tar.gz dexon-sol-tools-10aed4606223fc558d9c7f6d98ff11fa7ba393e4.tar.bz2 dexon-sol-tools-10aed4606223fc558d9c7f6d98ff11fa7ba393e4.tar.lz dexon-sol-tools-10aed4606223fc558d9c7f6d98ff11fa7ba393e4.tar.xz dexon-sol-tools-10aed4606223fc558d9c7f6d98ff11fa7ba393e4.tar.zst dexon-sol-tools-10aed4606223fc558d9c7f6d98ff11fa7ba393e4.zip |
Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js:
Update CHANGELOG
Remove unused CHANGELOG entry
Remove unused import
Change assert.doesConformToShema interface
Remove a type assertion
Remove type-level validation
Access property over this
Add type cast
Fix tests
Add entries to the CHANGELOG
Better validate ZeroExConfig on public networks
Diffstat (limited to 'packages/0x.js/src/0x.ts')
-rw-r--r-- | packages/0x.js/src/0x.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts index 6cfa65cc2..c578478d8 100644 --- a/packages/0x.js/src/0x.ts +++ b/packages/0x.js/src/0x.ts @@ -13,6 +13,8 @@ import { TokenTransferProxyWrapper } from './contract_wrappers/token_transfer_pr import { TokenWrapper } from './contract_wrappers/token_wrapper'; import { OrderStateWatcher } from './order_watcher/order_state_watcher'; import { zeroExConfigSchema } from './schemas/zero_ex_config_schema'; +import { zeroExPrivateNetworkConfigSchema } from './schemas/zero_ex_private_network_config_schema'; +import { zeroExPublicNetworkConfigSchema } from './schemas/zero_ex_public_network_config_schema'; import { ECSignature, Order, SignedOrder, Web3Provider, ZeroExConfig, ZeroExError } from './types'; import { assert } from './utils/assert'; import { constants } from './utils/constants'; @@ -163,7 +165,10 @@ export class ZeroEx { */ constructor(provider: Web3Provider, config: ZeroExConfig) { assert.isWeb3Provider('provider', provider); - assert.doesConformToSchema('config', config, zeroExConfigSchema); + assert.doesConformToSchema('config', config, zeroExConfigSchema, [ + zeroExPrivateNetworkConfigSchema, + zeroExPublicNetworkConfigSchema, + ]); const artifactJSONs = _.values(artifacts); const abiArrays = _.map(artifactJSONs, artifact => artifact.abi); this._abiDecoder = new AbiDecoder(abiArrays); |