diff options
author | Remco Bloemen <remco@wicked.ventures> | 2018-08-18 05:19:19 +0800 |
---|---|---|
committer | Remco Bloemen <remco@wicked.ventures> | 2018-08-25 07:46:23 +0800 |
commit | b16f5f55fb66aac624dfb82b881026b588f66b79 (patch) | |
tree | f48b7c7109bf34b284268becef8382f65ac45c72 | |
parent | d92fd437911a5b9c0af15322e39dd4c2a1f4ab60 (diff) | |
download | dexon-0x-contracts-b16f5f55fb66aac624dfb82b881026b588f66b79.tar dexon-0x-contracts-b16f5f55fb66aac624dfb82b881026b588f66b79.tar.gz dexon-0x-contracts-b16f5f55fb66aac624dfb82b881026b588f66b79.tar.bz2 dexon-0x-contracts-b16f5f55fb66aac624dfb82b881026b588f66b79.tar.lz dexon-0x-contracts-b16f5f55fb66aac624dfb82b881026b588f66b79.tar.xz dexon-0x-contracts-b16f5f55fb66aac624dfb82b881026b588f66b79.tar.zst dexon-0x-contracts-b16f5f55fb66aac624dfb82b881026b588f66b79.zip |
Check fillable early
-rw-r--r-- | packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol b/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol index 36060a1b6..e281de264 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol @@ -90,6 +90,12 @@ contract MixinExchangeCore is { // Fetch order info 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 address takerAddress = getCurrentContextAddress(); |