diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-09 17:17:32 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-09 17:17:32 +0800 |
commit | dca572e74442534dc9f1bb853b2d8e9fe018639a (patch) | |
tree | 5435c6dd642f7a4f89fe6c9d8a04eb92d9e68a4c /src/contract_wrappers | |
parent | ab40123768a3376bd2b36bd0d85a8e476b89dc10 (diff) | |
download | dexon-0x-contracts-dca572e74442534dc9f1bb853b2d8e9fe018639a.tar.gz dexon-0x-contracts-dca572e74442534dc9f1bb853b2d8e9fe018639a.tar.zst dexon-0x-contracts-dca572e74442534dc9f1bb853b2d8e9fe018639a.zip |
Fix the bug of not awaiting an async function
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r-- | src/contract_wrappers/exchange_wrapper.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index 73ec0886c..7fedf3183 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -282,10 +282,9 @@ export class ExchangeWrapper extends ContractWrapper { orderFillOrKillRequestsSchema, ); const exchangeInstance = await this.getExchangeContractAsync(); - _.each(orderFillOrKillRequests, request => { - this.validateFillOrKillOrderAndThrowIfInvalidAsync(request.signedOrder, - exchangeInstance.address, - request.fillTakerAmount); + _.each(orderFillOrKillRequests, async request => { + await this.validateFillOrKillOrderAndThrowIfInvalidAsync(request.signedOrder, exchangeInstance.address, + request.fillTakerAmount); }); const orderAddressesValuesAndTakerTokenFillAmounts = _.map(orderFillOrKillRequests, request => { |