fix
This commit is contained in:
parent
41bdb0509d
commit
edf9cdc655
|
@ -164,7 +164,8 @@ function EditLeverageForm({
|
|||
const stakePrice = stakeBank?.uiPrice
|
||||
if (!borrowPrice || !stakePrice || !Number(tokenMax.maxAmount)) return 0
|
||||
const borrowAmount =
|
||||
stakeBank?.uiPrice * Number(tokenMax.maxAmount) * (leverage - 1)
|
||||
(stakeBank?.uiPrice * Number(tokenMax.maxAmount) * (leverage - 1)) /
|
||||
borrowBank.uiPrice
|
||||
return borrowAmount
|
||||
}, [leverage, borrowBank, stakeBank, tokenMax])
|
||||
|
||||
|
@ -180,7 +181,6 @@ function EditLeverageForm({
|
|||
return available
|
||||
}, [borrowBank])
|
||||
|
||||
//TODO fix for LSTS
|
||||
const changeInJLP = useMemo(() => {
|
||||
if (stakeBankAmount) {
|
||||
return Number(
|
||||
|
|
|
@ -294,7 +294,7 @@ const PositionItem = ({
|
|||
)}
|
||||
</span>
|
||||
</div>
|
||||
{position.bank.name == 'JLP' ? (
|
||||
{position.bank.name == 'USDC' ? null : (
|
||||
<>
|
||||
<div>
|
||||
<p className="mb-1 text-th-fgd-4">Leverage</p>
|
||||
|
@ -332,7 +332,7 @@ const PositionItem = ({
|
|||
) : null} */}
|
||||
</div>
|
||||
</>
|
||||
) : null}
|
||||
)}
|
||||
</div>
|
||||
{showEditLeverageModal ? (
|
||||
<EditLeverageModal
|
||||
|
|
Loading…
Reference in New Issue