diff --git a/markets/perps-market/contracts/interfaces/IAsyncOrderModule.sol b/markets/perps-market/contracts/interfaces/IAsyncOrderModule.sol index 8a6b5800cc..7afabaf78d 100644 --- a/markets/perps-market/contracts/interfaces/IAsyncOrderModule.sol +++ b/markets/perps-market/contracts/interfaces/IAsyncOrderModule.sol @@ -60,6 +60,7 @@ interface IAsyncOrderModule { struct SettleOrderRuntime { uint128 marketId; uint128 accountId; + int128 sizeDelta; int128 newPositionSize; int256 pnl; uint256 pnlUint; diff --git a/markets/perps-market/contracts/modules/AsyncOrderModule.sol b/markets/perps-market/contracts/modules/AsyncOrderModule.sol index 488c31e6fe..ab6e415b17 100644 --- a/markets/perps-market/contracts/modules/AsyncOrderModule.sol +++ b/markets/perps-market/contracts/modules/AsyncOrderModule.sol @@ -177,6 +177,7 @@ contract AsyncOrderModule is IAsyncOrderModule { runtime.accountId = asyncOrder.accountId; runtime.marketId = asyncOrder.marketId; + runtime.sizeDelta = asyncOrder.sizeDelta; // check if account is flagged GlobalPerpsMarket.load().checkLiquidation(runtime.accountId); @@ -224,7 +225,6 @@ contract AsyncOrderModule is IAsyncOrderModule { // exctracted from asyncOrder before order is reset bytes32 trackingCode = asyncOrder.trackingCode; - int128 sizeDelta = asyncOrder.sizeDelta; asyncOrder.reset(); @@ -234,7 +234,7 @@ contract AsyncOrderModule is IAsyncOrderModule { runtime.accountId, fillPrice, runtime.pnl, - sizeDelta, + runtime.sizeDelta, runtime.newPositionSize, totalFees, runtime.settlementReward,