aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-08-24 00:29:24 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-08-24 15:55:02 +0800
commitdc3756bc992b2db4eb26935f8861123ed76189e6 (patch)
tree2fa6690ac80c8e95488db3412bafa38ce62ecd67 /src
parent32b214179468dc56a7013bc9399ff968e9d455fc (diff)
downloaddexon-sol-tools-dc3756bc992b2db4eb26935f8861123ed76189e6.tar
dexon-sol-tools-dc3756bc992b2db4eb26935f8861123ed76189e6.tar.gz
dexon-sol-tools-dc3756bc992b2db4eb26935f8861123ed76189e6.tar.bz2
dexon-sol-tools-dc3756bc992b2db4eb26935f8861123ed76189e6.tar.lz
dexon-sol-tools-dc3756bc992b2db4eb26935f8861123ed76189e6.tar.xz
dexon-sol-tools-dc3756bc992b2db4eb26935f8861123ed76189e6.tar.zst
dexon-sol-tools-dc3756bc992b2db4eb26935f8861123ed76189e6.zip
Simplify the validation check for ExchangeContractErrs.OrderAlreadyCancelledOrFilled
Diffstat (limited to 'src')
-rw-r--r--src/utils/order_validation_utils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/order_validation_utils.ts b/src/utils/order_validation_utils.ts
index 379ff5fdf..6f9cd7b1a 100644
--- a/src/utils/order_validation_utils.ts
+++ b/src/utils/order_validation_utils.ts
@@ -58,7 +58,7 @@ export class OrderValidationUtils {
if (cancelTakerTokenAmount.eq(0)) {
throw new Error(ExchangeContractErrs.OrderCancelAmountZero);
}
- if (order.takerTokenAmount.minus(unavailableTakerTokenAmount).eq(0)) {
+ if (order.takerTokenAmount.eq(unavailableTakerTokenAmount)) {
throw new Error(ExchangeContractErrs.OrderAlreadyCancelledOrFilled);
}
const currentUnixTimestampSec = utils.getCurrentUnixTimestamp();