Mp 3443 sage feedback pre mars v 2 credit manager (#522)
This commit is contained in:
parent
7056e8240e
commit
7864b579cf
@ -9,7 +9,7 @@ export default function Skeleton() {
|
|||||||
<div className='flex flex-wrap justify-center w-full py-4'>
|
<div className='flex flex-wrap justify-center w-full py-4'>
|
||||||
<HealthGauge health={0} />
|
<HealthGauge health={0} />
|
||||||
<Text size='2xs' className='mb-0.5 mt-1 w-full text-center text-white/50'>
|
<Text size='2xs' className='mb-0.5 mt-1 w-full text-center text-white/50'>
|
||||||
Account Health
|
Health
|
||||||
</Text>
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
<div className='flex flex-wrap justify-center w-full py-4 border-t border-white/20'>
|
<div className='flex flex-wrap justify-center w-full py-4 border-t border-white/20'>
|
||||||
|
@ -85,7 +85,8 @@ function AccountDetails(props: Props) {
|
|||||||
[lendingAvailableAssets, accountLentAssets],
|
[lendingAvailableAssets, accountLentAssets],
|
||||||
)
|
)
|
||||||
const apr = useMemo(
|
const apr = useMemo(
|
||||||
() => calculateAccountApr(account, borrowAssetsData, lendingAssetsData, prices),
|
() =>
|
||||||
|
calculateAccountApr(updatedAccount ?? account, borrowAssetsData, lendingAssetsData, prices),
|
||||||
[account, borrowAssetsData, lendingAssetsData, prices],
|
[account, borrowAssetsData, lendingAssetsData, prices],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -124,7 +125,7 @@ function AccountDetails(props: Props) {
|
|||||||
<div className='flex flex-wrap justify-center w-full py-4'>
|
<div className='flex flex-wrap justify-center w-full py-4'>
|
||||||
<HealthGauge health={health} updatedHealth={updatedHealth} />
|
<HealthGauge health={health} updatedHealth={updatedHealth} />
|
||||||
<Text size='2xs' className='mb-0.5 mt-1 w-full text-center text-white/50'>
|
<Text size='2xs' className='mb-0.5 mt-1 w-full text-center text-white/50'>
|
||||||
Account Health
|
Health
|
||||||
</Text>
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
<div className='w-full py-4 border-t border-white/20'>
|
<div className='w-full py-4 border-t border-white/20'>
|
||||||
|
@ -6,7 +6,7 @@ export default function BorrowIntro() {
|
|||||||
text={
|
text={
|
||||||
<>
|
<>
|
||||||
<span className='text-white'>Borrow</span> assets, against your collateral. But always
|
<span className='text-white'>Borrow</span> assets, against your collateral. But always
|
||||||
have an eye on your Account Health. Once it reaches zero, you'll be liquidated.
|
have an eye on your Health. Once it reaches zero, you'll be liquidated.
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
bg='borrow'
|
bg='borrow'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
export default function useHealthColorAndLabel(health: number, colorPrefix: 'fill' | 'text') {
|
export default function useHealthColorAndLabel(health: number, colorPrefix: 'fill' | 'text') {
|
||||||
if (health > 30) return [`${colorPrefix}-violet-500`, 'Healthy']
|
if (health > 30) return [`${colorPrefix}-violet-500`, `${health}% (Healthy)`]
|
||||||
if (health > 10) return [`${colorPrefix}-yellow-300`, 'Attention']
|
if (health > 10) return [`${colorPrefix}-yellow-300`, `${health}% (Attention)`]
|
||||||
|
|
||||||
return [`${colorPrefix}-martian-red`, 'Liquidation risk']
|
return [`${colorPrefix}-martian-red`, `${health}% (Liquidation risk)`]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user