aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-06-10 00:04:06 +0800
committerGitHub <noreply@github.com>2017-06-10 00:04:06 +0800
commitaf36ceb0b8f2d8c734b15158e69ba7bfb5fdc5a4 (patch)
tree8c516c1d33d77af980fd931739a0870b05ae262c
parent3a9d07c40ce2e26203962487036132d6357ec530 (diff)
parent48a2ce35fe77b4d1e9c9610a4f4bf2f5c9829ef1 (diff)
downloaddexon-sol-tools-af36ceb0b8f2d8c734b15158e69ba7bfb5fdc5a4.tar
dexon-sol-tools-af36ceb0b8f2d8c734b15158e69ba7bfb5fdc5a4.tar.gz
dexon-sol-tools-af36ceb0b8f2d8c734b15158e69ba7bfb5fdc5a4.tar.bz2
dexon-sol-tools-af36ceb0b8f2d8c734b15158e69ba7bfb5fdc5a4.tar.lz
dexon-sol-tools-af36ceb0b8f2d8c734b15158e69ba7bfb5fdc5a4.tar.xz
dexon-sol-tools-af36ceb0b8f2d8c734b15158e69ba7bfb5fdc5a4.tar.zst
dexon-sol-tools-af36ceb0b8f2d8c734b15158e69ba7bfb5fdc5a4.zip
Merge pull request #53 from 0xProject/async-bug
Fix the bug of not awaiting an async function
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 5473e2565..214a19df9 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -349,11 +349,10 @@ export class ExchangeWrapper extends ContractWrapper {
orderFillOrKillRequestsSchema,
);
const exchangeInstance = await this.getExchangeContractAsync();
- _.each(orderFillOrKillRequests, request => {
- this.validateFillOrKillOrderAndThrowIfInvalidAsync(request.signedOrder,
- exchangeInstance.address,
- request.fillTakerAmount);
- });
+ for (const request of orderFillOrKillRequests) {
+ await this.validateFillOrKillOrderAndThrowIfInvalidAsync(request.signedOrder, exchangeInstance.address,
+ request.fillTakerAmount);
+ }
const orderAddressesValuesAndTakerTokenFillAmounts = _.map(orderFillOrKillRequests, request => {
return [