Addressed amir's review feedback
This commit is contained in:
parent
79de188683
commit
ae151df2eb
@ -120,12 +120,7 @@ contract OrderValidationUtils is
|
||||
|
||||
// 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))
|
||||
) {
|
||||
if (!_areOrderAssetDatasValid(order)) {
|
||||
fillableTakerAssetAmount = 0;
|
||||
}
|
||||
|
||||
@ -207,6 +202,21 @@ contract OrderValidationUtils is
|
||||
return transferableAssetAmount;
|
||||
}
|
||||
|
||||
/// @dev Checks that the asset data contained in a ZeroEx is valid and returns
|
||||
/// a boolean that indicates whether or not the asset data was found to be valid.
|
||||
/// @param order A ZeroEx order to validate.
|
||||
/// @return The validatity of the asset data.
|
||||
function _areOrderAssetDatasValid(LibOrder.Order memory order)
|
||||
internal
|
||||
pure
|
||||
returns (bool)
|
||||
{
|
||||
return _isAssetDataValid(order.makerAssetData) &&
|
||||
(order.makerFee == 0 || _isAssetDataValid(order.makerFeeAssetData)) &&
|
||||
_isAssetDataValid(order.takerAssetData) &&
|
||||
(order.takerFee == 0 || _isAssetDataValid(order.takerFeeAssetData));
|
||||
}
|
||||
|
||||
/// @dev This function handles the edge cases around taker validation. This function
|
||||
/// currently attempts to find duplicate ERC721 token's in the taker
|
||||
/// multiAssetData.
|
||||
|
11
packages/contract-artifacts/artifacts/DevUtils.json
generated
11
packages/contract-artifacts/artifacts/DevUtils.json
generated
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user