Skip to content

Commit

Permalink
feat: undefined error
Browse files Browse the repository at this point in the history
  • Loading branch information
borcherd committed Dec 19, 2024
1 parent 755b552 commit e6c42e7
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ export const PositionActionButtons = ({
collateralBank: arenaPool.quoteBank,
size: positionSizeUsd,
leverage: Number(leverage),
entryPrice: positionData.entryPrice,
entryPrice: positionData && positionData.entryPrice ? positionData.entryPrice : 0,
exitPrice: arenaPool.tokenBank.info.oraclePrice.priceRealtime.price.toNumber(),
pnl: positionData.pnl,
pnl: positionData && positionData.pnl ? positionData.pnl : 0,
},
});
capture("close_position", {
Expand Down Expand Up @@ -214,6 +214,9 @@ export const PositionActionButtons = ({
setIsActionComplete,
setPreviousTxn,
arenaPool,
positionSizeUsd,
leverage,
positionData,
setIsRefreshingStore,
refreshGroup,
connection,
Expand Down

0 comments on commit e6c42e7

Please sign in to comment.