aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-02 18:24:57 +0800
committerGitHub <noreply@github.com>2018-07-02 18:24:57 +0800
commit590033bcb27c9e8299c1cb56b75f9a64d674affb (patch)
treeea50d633171cc78ca70146c7e883251c23ced0d1 /packages/order-utils
parentb9b00e10d39c3c84bc72892ef37f1313e904414d (diff)
parentaf1e4574a8ed97416ce27b1d9b532ee7ed02a746 (diff)
downloaddexon-sol-tools-590033bcb27c9e8299c1cb56b75f9a64d674affb.tar
dexon-sol-tools-590033bcb27c9e8299c1cb56b75f9a64d674affb.tar.gz
dexon-sol-tools-590033bcb27c9e8299c1cb56b75f9a64d674affb.tar.bz2
dexon-sol-tools-590033bcb27c9e8299c1cb56b75f9a64d674affb.tar.lz
dexon-sol-tools-590033bcb27c9e8299c1cb56b75f9a64d674affb.tar.xz
dexon-sol-tools-590033bcb27c9e8299c1cb56b75f9a64d674affb.tar.zst
dexon-sol-tools-590033bcb27c9e8299c1cb56b75f9a64d674affb.zip
Merge pull request #802 from 0xProject/fix/five_decimal_scenario
FillOrder Combinatorial Testing Fixes
Diffstat (limited to 'packages/order-utils')
-rw-r--r--packages/order-utils/src/order_validation_utils.ts6
1 files changed, 3 insertions, 3 deletions
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<BigNumber> {
- 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,