diff options
author | Remco Bloemen <remco@wicked.ventures> | 2018-08-18 03:12:27 +0800 |
---|---|---|
committer | Remco Bloemen <remco@wicked.ventures> | 2018-08-25 07:46:23 +0800 |
commit | d92fd437911a5b9c0af15322e39dd4c2a1f4ab60 (patch) | |
tree | dcd9b132eb7f7ff28e3aa7fa8f642dc895128e63 /packages | |
parent | e706fa76acfbf933479f767749755446cdaf438a (diff) | |
download | dexon-sol-tools-d92fd437911a5b9c0af15322e39dd4c2a1f4ab60.tar dexon-sol-tools-d92fd437911a5b9c0af15322e39dd4c2a1f4ab60.tar.gz dexon-sol-tools-d92fd437911a5b9c0af15322e39dd4c2a1f4ab60.tar.bz2 dexon-sol-tools-d92fd437911a5b9c0af15322e39dd4c2a1f4ab60.tar.lz dexon-sol-tools-d92fd437911a5b9c0af15322e39dd4c2a1f4ab60.tar.xz dexon-sol-tools-d92fd437911a5b9c0af15322e39dd4c2a1f4ab60.tar.zst dexon-sol-tools-d92fd437911a5b9c0af15322e39dd4c2a1f4ab60.zip |
Update for new assertValidFill signature
Diffstat (limited to 'packages')
-rw-r--r-- | packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol | 9 | ||||
-rw-r--r-- | packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol | 4 |
2 files changed, 8 insertions, 5 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 e6b2ddf3d..36060a1b6 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol @@ -98,6 +98,9 @@ contract MixinExchangeCore is uint256 remainingTakerAssetAmount = safeSub(order.takerAssetAmount, orderInfo.orderTakerAssetFilledAmount); uint256 takerAssetFilledAmount = min256(takerAssetFillAmount, remainingTakerAssetAmount); + // Compute proportional fill amounts + fillResults = calculateFillResults(order, takerAssetFilledAmount); + // Validate context assertValidFill( order, @@ -105,12 +108,10 @@ contract MixinExchangeCore is takerAddress, takerAssetFillAmount, takerAssetFilledAmount, + fillResults.makerAssetFilledAmount, signature ); - - // Compute proportional fill amounts - fillResults = calculateFillResults(order, takerAssetFilledAmount); - + // Update exchange internal state updateFilledState( order, diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol b/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol index 56b309a1b..4d0411a63 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol @@ -80,6 +80,7 @@ contract MixinMatchOrders is takerAddress, matchedFillResults.left.takerAssetFilledAmount, matchedFillResults.left.takerAssetFilledAmount, + matchedFillResults.left.makerAssetFilledAmount, leftSignature ); assertValidFill( @@ -88,9 +89,10 @@ contract MixinMatchOrders is takerAddress, matchedFillResults.right.takerAssetFilledAmount, matchedFillResults.right.takerAssetFilledAmount, + matchedFillResults.right.makerAssetFilledAmount, rightSignature ); - + // Update exchange state updateFilledState( leftOrder, |