Updated DevUtils again

This commit is contained in:
Alex Towle
2020-01-22 11:39:05 -08:00
parent a4ac418bc9
commit f53606007d
4 changed files with 25 additions and 17 deletions

View File

@@ -118,22 +118,19 @@ contract OrderValidationUtils is
transferableTakerAssetAmount
);
// Execute the maker transfers.
fillableTakerAssetAmount = LibOrderTransferSimulation.getSimulatedOrderMakerTransferResults(
exchangeAddress,
order,
order.takerAddress,
fillableTakerAssetAmount
) == LibOrderTransferSimulation.OrderTransferResults.TransfersSuccessful ? fillableTakerAssetAmount : 0;
if (!_isAssetDataValid(order.takerAssetData)) {
fillableTakerAssetAmount = 0;
}
if (order.takerFee != 0 && !_isAssetDataValid(order.takerFeeAssetData)) {
// Ensure that all of the asset data is valid. Fee asset data only needs
// to be valid if the fees are nonzero.
if (
!_isAssetDataValid(order.makerAssetData) ||
(order.makerFee != 0 && !_isAssetDataValid(order.makerFeeAssetData)) ||
!_isAssetDataValid(order.takerAssetData) ||
(order.takerFee != 0 && !_isAssetDataValid(order.takerFeeAssetData))
) {
fillableTakerAssetAmount = 0;
}
// If the order is not fillable, then the fillable taker asset amount is
// zero by definition.
if (orderInfo.orderStatus != LibOrder.OrderStatus.FILLABLE) {
fillableTakerAssetAmount = 0;
}