aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts4
-rw-r--r--test/exchange_wrapper_test.ts3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index dd3c3c933..dc2c95d4e 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -76,7 +76,7 @@ export class ExchangeWrapper extends ContractWrapper {
const senderAddress = await this.web3Wrapper.getSenderAddressOrThrowAsync();
const exchangeInstance = await this.getExchangeContractAsync();
- this.validateFillOrder(signedOrder, fillTakerAmountInBaseUnits, senderAddress);
+ await this.validateFillOrderAsync(signedOrder, fillTakerAmountInBaseUnits, senderAddress);
const orderAddresses: OrderAddresses = [
signedOrder.maker,
@@ -120,7 +120,7 @@ export class ExchangeWrapper extends ContractWrapper {
);
this.throwErrorLogsAsErrors(response.logs);
}
- private async validateFillOrder(signedOrder: SignedOrder, fillAmount: BigNumber.BigNumber, senderAddress: string) {
+ private async validateFillOrderAsync(signedOrder: SignedOrder, fillAmount: BigNumber.BigNumber, senderAddress: string) {
if (fillAmount.eq(0)) {
throw new Error(FillOrderValidationErrs.FILL_AMOUNT_IS_ZERO);
}
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index 09fb11cb3..2746c9e46 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -161,7 +161,8 @@ describe('ExchangeWrapper', () => {
makerAmount, addressBySymbol.MLN, takerAmount, addressBySymbol.GNT);
zeroEx.setDefaultAccount(taker);
const moreThanTheBalance = new BigNumber(6);
- expect(zeroEx.exchange.fillOrderAsync(signedOrder, moreThanTheBalance, true))
+ const checkTransfer = true;
+ expect(zeroEx.exchange.fillOrderAsync(signedOrder, moreThanTheBalance, checkTransfer))
.to.be.rejectedWith(FillOrderValidationErrs.NOT_ENOUGH_TAKER_BALANCE);
});
});