diff --git a/components/Positions.tsx b/components/Positions.tsx index 4116089..f50efde 100644 --- a/components/Positions.tsx +++ b/components/Positions.tsx @@ -1,6 +1,6 @@ import useMangoGroup from 'hooks/useMangoGroup' import { useMemo } from 'react' -import { BORROW_TOKEN, SHOW_INACTIVE_POSITIONS_KEY } from 'utils/constants' +import { SHOW_INACTIVE_POSITIONS_KEY } from 'utils/constants' import TokenLogo from './shared/TokenLogo' import Button from './shared/Button' import { formatTokenSymbol } from 'utils/tokens' @@ -15,7 +15,6 @@ import { } from '@blockworks-foundation/mango-v4' import useBankRates from 'hooks/useBankRates' import usePositions from 'hooks/usePositions' -import Tooltip from './shared/Tooltip' const set = mangoStore.getState().set @@ -36,7 +35,7 @@ const getLiquidationRatio = ( return ( (Math.abs(borrowBalance) * borrowBank.maintLiabWeight.toNumber()) / (stakeBalance * stakeBank.maintAssetWeight.toNumber()) - ).toFixed(3) + ).toFixed(2) } const Positions = ({ @@ -137,6 +136,8 @@ const PositionItem = ({ return [liqRatio, liqPriceChangePercentage.toFixed(2)] }, [bank, borrowBalance, borrowBank, stakeBalance]) + console.log('liq price change percentage', liqPriceChangePercentage) + const { estimatedNetAPY, stakeBankDepositRate } = useBankRates( bank.name, leverage, @@ -154,13 +155,7 @@ const PositionItem = ({

{formatTokenSymbol(bank.name)}

- {/* - {stakeBalance ? 'Opened 2 weeks ago' : 'No Position'} - */} +

${bank.uiPrice.toFixed(2)}