aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers/exchange_wrapper.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-30 01:49:44 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-30 01:49:44 +0800
commit3acdeaf518536cac780116c913c8d1b60999cf03 (patch)
tree4773479fb00a0ba9493af8c5299f2750565a039e /src/contract_wrappers/exchange_wrapper.ts
parente9db5327278c8015f8e091ae8de6e6cf95caa126 (diff)
downloaddexon-sol-tools-3acdeaf518536cac780116c913c8d1b60999cf03.tar
dexon-sol-tools-3acdeaf518536cac780116c913c8d1b60999cf03.tar.gz
dexon-sol-tools-3acdeaf518536cac780116c913c8d1b60999cf03.tar.bz2
dexon-sol-tools-3acdeaf518536cac780116c913c8d1b60999cf03.tar.lz
dexon-sol-tools-3acdeaf518536cac780116c913c8d1b60999cf03.tar.xz
dexon-sol-tools-3acdeaf518536cac780116c913c8d1b60999cf03.tar.zst
dexon-sol-tools-3acdeaf518536cac780116c913c8d1b60999cf03.zip
Mve schema assertion up to prevent the _.map failure
Diffstat (limited to 'src/contract_wrappers/exchange_wrapper.ts')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 6138d4ce9..e3e762ff7 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -295,6 +295,7 @@ export class ExchangeWrapper extends ContractWrapper {
@decorators.contractCallErrorHandler
public async batchFillOrderAsync(orderFillRequests: OrderFillRequest[],
shouldCheckTransfer: boolean, takerAddress: string): Promise<void> {
+ assert.doesConformToSchema('orderFillRequests', orderFillRequests, orderFillRequestsSchema);
const exchangeContractAddresses = _.map(
orderFillRequests,
orderFillRequest => orderFillRequest.signedOrder.exchangeContractAddress,
@@ -303,7 +304,6 @@ export class ExchangeWrapper extends ContractWrapper {
ExchangeContractErrs.BATCH_ORDERS_MUST_HAVE_SAME_EXCHANGE_ADDRESS);
assert.isBoolean('shouldCheckTransfer', shouldCheckTransfer);
await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper);
- assert.doesConformToSchema('orderFillRequests', orderFillRequests, orderFillRequestsSchema);
for (const orderFillRequest of orderFillRequests) {
await this._validateFillOrderAndThrowIfInvalidAsync(
orderFillRequest.signedOrder, orderFillRequest.takerTokenFillAmount, takerAddress);