Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Cancel signature abstraction
Browse files Browse the repository at this point in the history
  • Loading branch information
recmo committed Feb 14, 2018
1 parent f1710f4 commit a575cf5
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ contract MixinExchangeCore is
function cancelOrder(
address[5] orderAddresses,
uint256[6] orderValues,
uint256 takerTokenCancelAmount)
uint256 takerTokenCancelAmount,
bytes signature)
public
returns (uint256 takerTokenCancelledAmount)
{
Expand All @@ -183,8 +184,14 @@ contract MixinExchangeCore is
orderHash: getOrderHash(orderAddresses, orderValues)
});

require(order.maker == msg.sender);
require(order.makerTokenAmount > 0 && order.takerTokenAmount > 0 && takerTokenCancelAmount > 0);
require(order.makerTokenAmount > 0);
require(order.takerTokenAmount > 0);
require(takerTokenCancelAmount > 0);
require(isValidSignature(
order.orderHash,
order.maker,
signature
));

if (block.timestamp >= order.expirationTimestampInSec) {
LogError(uint8(Errors.ORDER_EXPIRED), order.orderHash);
Expand Down

0 comments on commit a575cf5

Please sign in to comment.