diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-08-25 09:09:32 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-08-25 09:20:26 +0800 |
commit | ec2e726be0a653465d3c83e640aa4c1556a0f10f (patch) | |
tree | 2d5b38f738fb37c1bf0b9e132ce90a6f3b490b22 | |
parent | 287830d6e01a919bcb4ac4ccec4173cdbdcf9470 (diff) | |
download | dexon-0x-contracts-ec2e726be0a653465d3c83e640aa4c1556a0f10f.tar.gz dexon-0x-contracts-ec2e726be0a653465d3c83e640aa4c1556a0f10f.tar.zst dexon-0x-contracts-ec2e726be0a653465d3c83e640aa4c1556a0f10f.zip |
Rephrased some of the math in MixinMatchOrders to improve readability
-rw-r--r-- | packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol | 6 |
1 files changed, 3 insertions, 3 deletions
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 8f289ee85..226a1bfb6 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol @@ -184,12 +184,12 @@ contract MixinMatchOrders is // Case 1: Right order is fully filled matchedFillResults.right.makerAssetFilledAmount = rightMakerAssetAmountRemaining; matchedFillResults.right.takerAssetFilledAmount = rightTakerAssetAmountRemaining; + matchedFillResults.left.takerAssetFilledAmount = matchedFillResults.right.makerAssetFilledAmount; matchedFillResults.left.makerAssetFilledAmount = getPartialAmountFloor( leftOrder.makerAssetAmount, leftOrder.takerAssetAmount, - matchedFillResults.right.makerAssetFilledAmount + matchedFillResults.left.takerAssetFilledAmount ); - matchedFillResults.left.takerAssetFilledAmount = matchedFillResults.right.makerAssetFilledAmount; } else { // Case 2: Left order is fully filled matchedFillResults.left.makerAssetFilledAmount = leftMakerAssetAmountRemaining; @@ -198,7 +198,7 @@ contract MixinMatchOrders is matchedFillResults.right.takerAssetFilledAmount = getPartialAmountCeil( rightOrder.takerAssetAmount, rightOrder.makerAssetAmount, - matchedFillResults.left.takerAssetFilledAmount + matchedFillResults.right.makerAssetFilledAmount ); } |