diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-10 00:28:49 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-10 00:28:49 +0800 |
commit | 33741c5e1e258523cb49d8171de0b5218e70ca3d (patch) | |
tree | 06ae0e776cf9e1127739d52d5c56f6f844aa4072 /src | |
parent | 876f6ac343a2d43df0e5f276d0950ecc97d42c78 (diff) | |
download | dexon-sol-tools-33741c5e1e258523cb49d8171de0b5218e70ca3d.tar dexon-sol-tools-33741c5e1e258523cb49d8171de0b5218e70ca3d.tar.gz dexon-sol-tools-33741c5e1e258523cb49d8171de0b5218e70ca3d.tar.bz2 dexon-sol-tools-33741c5e1e258523cb49d8171de0b5218e70ca3d.tar.lz dexon-sol-tools-33741c5e1e258523cb49d8171de0b5218e70ca3d.tar.xz dexon-sol-tools-33741c5e1e258523cb49d8171de0b5218e70ca3d.tar.zst dexon-sol-tools-33741c5e1e258523cb49d8171de0b5218e70ca3d.zip |
Fix test
Diffstat (limited to 'src')
-rw-r--r-- | src/contract_wrappers/exchange_wrapper.ts | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index 96e0ac38d..c76de79e9 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -172,15 +172,12 @@ export class ExchangeWrapper extends ContractWrapper { ExchangeContractErrs.MULTIPLE_TAKER_TOKENS_IN_FILL_UP_TO_DISALLOWED); assert.isBigNumber('takerTokenFillAmount', takerTokenFillAmount); assert.isBoolean('shouldCheckTransfer', shouldCheckTransfer); - assert.doesConformToSchema( - 'signedOrders', SchemaValidator.convertToJSONSchemaCompatibleObject(signedOrders), signedOrdersSchema - ); + assert.doesConformToSchema('signedOrders', signedOrders, signedOrdersSchema); await assert.isSenderAddressAsync('takerAddress', takerAddress, this.web3Wrapper); - _.forEach(signedOrders, - async (signedOrder: SignedOrder, i: number) => { - await this.validateFillOrderAndThrowIfInvalidAsync( - signedOrder, takerTokenFillAmount, takerAddress); - }); + for (const signedOrder of signedOrders) { + await this.validateFillOrderAndThrowIfInvalidAsync( + signedOrder, takerTokenFillAmount, takerAddress); + } if (_.isEmpty(signedOrders)) { return; // no-op } |