Compare commits

...

3 Commits

Author SHA1 Message Date
saml33 eb3f28f798
Merge 83c662c8a5 into 6ebca4f76c 2024-03-25 23:43:39 +00:00
Adrian Brzeziński 83c662c8a5 Merge branch 'add-v1-tokens' of https://github.com/blockworks-foundation/lev-stake-sol into add-v1-tokens 2024-03-26 00:42:57 +01:00
Adrian Brzeziński edf9cdc655 fix 2024-03-26 00:42:31 +01:00
2 changed files with 4 additions and 4 deletions

View File

@ -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(

View File

@ -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