Fix validation logic by checking for 0 maker/taker amount before 0 fillTakerAssetAmount since one causes the other during combinatorial testing
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user