From 54e8bf773091eb2c8587c72e50892afec42abb9d Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 2 Jun 2017 17:41:23 +0200 Subject: Assign wouldRoundingErrorOccur to a variable --- src/contract_wrappers/exchange_wrapper.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index e957530ae..828994829 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -139,8 +139,10 @@ export class ExchangeWrapper extends ContractWrapper { await this.validateFillOrderBalancesAndAllowancesAndThrowIfInvalidAsync(signedOrder, fillTakerAmount, senderAddress, zrxTokenAddress); - if (await this.isRoundingErrorAsync(signedOrder.takerTokenAmount, fillTakerAmount, - signedOrder.makerTokenAmount)) { + const wouldRoundingErrorOccur = await this.isRoundingErrorAsync( + signedOrder.takerTokenAmount, fillTakerAmount, signedOrder.makerTokenAmount, + ); + if (wouldRoundingErrorOccur) { throw new Error(FillOrderValidationErrs.ROUNDING_ERROR); } } -- cgit