Added getNullFillResults
This commit is contained in:
@@ -107,7 +107,7 @@ contract MixinExchangeCore is
|
||||
);
|
||||
if (status != uint8(Status.SUCCESS)) {
|
||||
emit ExchangeStatus(uint8(status), orderInfo.orderHash);
|
||||
return fillResults;
|
||||
return getNullFillResults();
|
||||
}
|
||||
|
||||
// Settle order
|
||||
|
@@ -50,4 +50,19 @@ contract LibFillResults is
|
||||
totalFillResults.makerFeePaid = safeAdd(totalFillResults.makerFeePaid, singleFillResults.makerFeePaid);
|
||||
totalFillResults.takerFeePaid = safeAdd(totalFillResults.takerFeePaid, singleFillResults.takerFeePaid);
|
||||
}
|
||||
|
||||
/// @dev Returns a null fill results struct
|
||||
function getNullFillResults()
|
||||
internal
|
||||
pure
|
||||
returns (FillResults memory)
|
||||
{
|
||||
// returns zeroed out FillResults instance
|
||||
return FillResults({
|
||||
makerAssetFilledAmount: 0,
|
||||
takerAssetFilledAmount: 0,
|
||||
makerFeePaid: 0,
|
||||
takerFeePaid: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user