Check fillable early

This commit is contained in:
Remco Bloemen 2018-08-17 14:19:19 -07:00
parent d92fd43791
commit b16f5f55fb

View File

@ -90,6 +90,12 @@ contract MixinExchangeCore is
{ {
// Fetch order info // Fetch order info
OrderInfo memory orderInfo = getOrderInfo(order); OrderInfo memory orderInfo = getOrderInfo(order);
// An order can only be filled if its status is FILLABLE.
require(
orderInfo.orderStatus == uint8(OrderStatus.FILLABLE),
"ORDER_UNFILLABLE"
);
// Fetch taker address // Fetch taker address
address takerAddress = getCurrentContextAddress(); address takerAddress = getCurrentContextAddress();