-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchanges.patch
More file actions
21 lines (17 loc) · 1.22 KB
/
changes.patch
File metadata and controls
21 lines (17 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/contracts/libraries/core/LibTradeOperations.sol b/contracts/libraries/core/LibTradeOperations.sol
index 56fe393..2f2f9ef 100644
--- a/contracts/libraries/core/LibTradeOperations.sol
+++ b/contracts/libraries/core/LibTradeOperations.sol
@@ -191,6 +191,7 @@ library LibTradeOperations {
{
FeeManagementStorage.Layout storage feeLayout = FeeManagementStorage.layout();
FeeStructure memory s = trade.feeStructure;
+ ScheduledReleaseBalance storage partyAFeeBalance = trade.partyA.balanceOf(s.feeToken);
/* ---------------------------------------- GET FEES ---------------------------------------- */
uint256 pnlInCollateral = (pnl * 1e18) / sig.collateralPrice;
@@ -199,7 +200,7 @@ library LibTradeOperations {
DecreaseBalanceReason[2] memory decReasons = [DecreaseBalanceReason.PLATFORM_FEE, DecreaseBalanceReason.AFFILIATE_FEE];
for (uint8 j; j < 2; ++j)
- partyABalance.subForCounterParty(trade.partyB, fees[j], trade.tradeAgreements.marginType, decReasons[j]);
+ partyAFeeBalance.subForCounterParty(trade.partyB, fees[j], trade.tradeAgreements.marginType, decReasons[j]);
/* ---------------------------------------- PAY FEES ---------------------------------------- */