aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-30 01:50:22 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-30 01:50:22 +0800
commitb896a723c250fbb70b067416fbcf2067593d74b9 (patch)
treee593cedfd4eaeec635f18ba1bc71709fdee9686b /src
parent3acdeaf518536cac780116c913c8d1b60999cf03 (diff)
downloaddexon-0x-contracts-b896a723c250fbb70b067416fbcf2067593d74b9.tar.gz
dexon-0x-contracts-b896a723c250fbb70b067416fbcf2067593d74b9.tar.zst
dexon-0x-contracts-b896a723c250fbb70b067416fbcf2067593d74b9.zip
Move schema assertion up to prevent the _.map failure
Diffstat (limited to 'src')
-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 e3e762ff7..7d2d976fb 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -413,6 +413,7 @@ export class ExchangeWrapper extends ContractWrapper {
@decorators.contractCallErrorHandler
public async batchFillOrKillAsync(orderFillOrKillRequests: OrderFillOrKillRequest[],
takerAddress: string): Promise<void> {
+ assert.doesConformToSchema('orderFillOrKillRequests', orderFillOrKillRequests, orderFillOrKillRequestsSchema);
const exchangeContractAddresses = _.map(
orderFillOrKillRequests,
orderFillOrKillRequest => orderFillOrKillRequest.signedOrder.exchangeContractAddress,
@@ -420,7 +421,6 @@ export class ExchangeWrapper extends ContractWrapper {
assert.hasAtMostOneUniqueValue(exchangeContractAddresses,
ExchangeContractErrs.BATCH_ORDERS_MUST_HAVE_SAME_EXCHANGE_ADDRESS);
await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper);
- assert.doesConformToSchema('orderFillOrKillRequests', orderFillOrKillRequests, orderFillOrKillRequestsSchema);
if (_.isEmpty(orderFillOrKillRequests)) {
return; // no-op
}