@@ -186,7 +186,7 @@ export function calculateUnrealizedAssetWeight(
186
186
quoteSpotMarket : SpotMarketAccount ,
187
187
unrealizedPnl : BN ,
188
188
marginCategory : MarginCategory ,
189
- oraclePriceData : OraclePriceData
189
+ oraclePriceData : Pick < OraclePriceData , 'price' >
190
190
) : BN {
191
191
let assetWeight : BN ;
192
192
switch ( marginCategory ) {
@@ -252,7 +252,7 @@ export function calculateMarketMaxAvailableInsurance(
252
252
253
253
export function calculateNetUserPnl (
254
254
perpMarket : PerpMarketAccount ,
255
- oraclePriceData : OraclePriceData
255
+ oraclePriceData : Pick < OraclePriceData , 'price' >
256
256
) : BN {
257
257
const netUserPositionValue = perpMarket . amm . baseAssetAmountWithAmm
258
258
. add ( perpMarket . amm . baseAssetAmountWithUnsettledLp )
@@ -272,7 +272,7 @@ export function calculateNetUserPnl(
272
272
export function calculateNetUserPnlImbalance (
273
273
perpMarket : PerpMarketAccount ,
274
274
spotMarket : SpotMarketAccount ,
275
- oraclePriceData : OraclePriceData ,
275
+ oraclePriceData : Pick < OraclePriceData , 'price' > ,
276
276
applyFeePoolDiscount = true
277
277
) : BN {
278
278
const netUserPnl = calculateNetUserPnl ( perpMarket , oraclePriceData ) ;
0 commit comments