From f5a8f00af84fed0be0ab3127dc67190647baae0a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 2 Jul 2018 10:52:49 +0200 Subject: Fix validation logic by checking for 0 maker/taker amount before 0 fillTakerAssetAmount since one causes the other during combinatorial testing --- packages/order-utils/src/order_validation_utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/order-utils/src/order_validation_utils.ts') diff --git a/packages/order-utils/src/order_validation_utils.ts b/packages/order-utils/src/order_validation_utils.ts index 54428f77d..94df3ef82 100644 --- a/packages/order-utils/src/order_validation_utils.ts +++ b/packages/order-utils/src/order_validation_utils.ts @@ -140,12 +140,12 @@ export class OrderValidationUtils { takerAddress: string, zrxAssetData: string, ): Promise { - if (fillTakerAssetAmount.eq(0)) { - throw new Error(RevertReason.InvalidTakerAmount); - } if (signedOrder.makerAssetAmount.eq(0) || signedOrder.takerAssetAmount.eq(0)) { throw new Error(RevertReason.OrderUnfillable); } + if (fillTakerAssetAmount.eq(0)) { + throw new Error(RevertReason.InvalidTakerAmount); + } const orderHash = orderHashUtils.getOrderHashHex(signedOrder); const isValid = await isValidSignatureAsync( provider, -- cgit