diff --git a/src/components/Account/AccountDetails/Skeleton.tsx b/src/components/Account/AccountDetails/Skeleton.tsx index dd25cdc5..2140910e 100644 --- a/src/components/Account/AccountDetails/Skeleton.tsx +++ b/src/components/Account/AccountDetails/Skeleton.tsx @@ -9,7 +9,7 @@ export default function Skeleton() {
- Account Health + Health
diff --git a/src/components/Account/AccountDetails/index.tsx b/src/components/Account/AccountDetails/index.tsx index 70a06c12..eae039b9 100644 --- a/src/components/Account/AccountDetails/index.tsx +++ b/src/components/Account/AccountDetails/index.tsx @@ -85,7 +85,8 @@ function AccountDetails(props: Props) { [lendingAvailableAssets, accountLentAssets], ) const apr = useMemo( - () => calculateAccountApr(account, borrowAssetsData, lendingAssetsData, prices), + () => + calculateAccountApr(updatedAccount ?? account, borrowAssetsData, lendingAssetsData, prices), [account, borrowAssetsData, lendingAssetsData, prices], ) @@ -124,7 +125,7 @@ function AccountDetails(props: Props) {
- Account Health + Health
diff --git a/src/components/Borrow/BorrowIntro.tsx b/src/components/Borrow/BorrowIntro.tsx index bc416223..6be0f92b 100644 --- a/src/components/Borrow/BorrowIntro.tsx +++ b/src/components/Borrow/BorrowIntro.tsx @@ -6,7 +6,7 @@ export default function BorrowIntro() { text={ <> Borrow 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' diff --git a/src/hooks/useHealthColorAndLabel.ts b/src/hooks/useHealthColorAndLabel.ts index e49fd7cd..ed49fb43 100644 --- a/src/hooks/useHealthColorAndLabel.ts +++ b/src/hooks/useHealthColorAndLabel.ts @@ -1,6 +1,6 @@ export default function useHealthColorAndLabel(health: number, colorPrefix: 'fill' | 'text') { - if (health > 30) return [`${colorPrefix}-violet-500`, 'Healthy'] - if (health > 10) return [`${colorPrefix}-yellow-300`, 'Attention'] + if (health > 30) return [`${colorPrefix}-violet-500`, `${health}% (Healthy)`] + if (health > 10) return [`${colorPrefix}-yellow-300`, `${health}% (Attention)`] - return [`${colorPrefix}-martian-red`, 'Liquidation risk'] + return [`${colorPrefix}-martian-red`, `${health}% (Liquidation risk)`] }