diff --git a/package.json b/package.json index 1aa5f1ff..c6a2d52e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mars-v2-frontend", - "version": "2.0.5", + "version": "2.0.6", "private": true, "scripts": { "build": "yarn validate-env && next build", diff --git a/src/components/Divider.tsx b/src/components/Divider.tsx index cd57f1df..efd9fcca 100644 --- a/src/components/Divider.tsx +++ b/src/components/Divider.tsx @@ -7,7 +7,7 @@ interface Props { export default function Divider(props: Props) { if (props.orientation === 'vertical') { - return
+ return } return } diff --git a/src/components/Header/DesktopHeader.tsx b/src/components/Header/DesktopHeader.tsx index 785cb73b..f32a4911 100644 --- a/src/components/Header/DesktopHeader.tsx +++ b/src/components/Header/DesktopHeader.tsx @@ -10,12 +10,13 @@ import Settings from 'components/Settings' import Wallet from 'components/Wallet' import useAccountId from 'hooks/useAccountId' import useStore from 'store' +import { ENABLE_HLS, ENABLE_PERPS } from 'utils/constants' import { WalletID } from 'types/enums/wallet' -import { ENABLE_HLS } from 'utils/constants' import { getGovernanceUrl } from 'utils/helpers' export const menuTree = (walletId: WalletID): MenuTreeEntry[] => [ { pages: ['trade'], label: 'Trade' }, + ...(ENABLE_PERPS ? [{ pages: ['perps'] as Page[], label: 'Perps' }] : []), { pages: ['lend', 'farm'], label: 'Earn' }, { pages: ['borrow'], label: 'Borrow' }, ...(ENABLE_HLS ? [{ pages: ['hls-staking'] as Page[], label: 'High Leverage' }] : []), diff --git a/src/components/MarketDetails.tsx b/src/components/MarketDetails.tsx index 219fe65f..607a8a65 100644 --- a/src/components/MarketDetails.tsx +++ b/src/components/MarketDetails.tsx @@ -68,7 +68,9 @@ export default function MarketDetails({ row, type }: Props) { title: 'Oracle Price', }, { - amount: totalBorrowed.dividedBy(marketDepositAmount).multipliedBy(100).toNumber(), + amount: totalBorrowed.isZero() + ? 0 + : totalBorrowed.dividedBy(marketDepositAmount).multipliedBy(100).toNumber(), options: { minDecimals: 2, maxDecimals: 2, suffix: '%' }, title: 'Utilization Rate', }, @@ -97,7 +99,9 @@ export default function MarketDetails({ row, type }: Props) { title: 'Oracle Price', }, { - amount: totalBorrowed.dividedBy(marketDepositAmount).multipliedBy(100).toNumber(), + amount: totalBorrowed.isZero() + ? 0 + : totalBorrowed.dividedBy(marketDepositAmount).multipliedBy(100).toNumber(), options: { minDecimals: 2, maxDecimals: 2, suffix: '%' }, title: 'Utilization Rate', }, diff --git a/src/components/Navigation/DesktopNavigation.tsx b/src/components/Navigation/DesktopNavigation.tsx index c53860bd..859b1b80 100644 --- a/src/components/Navigation/DesktopNavigation.tsx +++ b/src/components/Navigation/DesktopNavigation.tsx @@ -31,7 +31,9 @@ export default function DesktopNavigation() { return (