diff --git a/components/account/AccountPage.tsx b/components/account/AccountPage.tsx index d94ce661..be701fb5 100644 --- a/components/account/AccountPage.tsx +++ b/components/account/AccountPage.tsx @@ -20,8 +20,6 @@ import { ArrowsPointingOutIcon, ChartBarIcon, ClockIcon, - EyeIcon, - EyeSlashIcon, } from '@heroicons/react/20/solid' import { Transition } from '@headlessui/react' import AccountTabs from './AccountTabs' @@ -32,8 +30,6 @@ import Change from '../shared/Change' import Tooltip from '@components/shared/Tooltip' import { ANIMATION_SETTINGS_KEY, - HIDE_ACCOUNT_VALUE_KEY, - HIDE_PNL_KEY, // IS_ONBOARDED_KEY } from 'utils/constants' // import { useWallet } from '@solana/wallet-adapter-react' @@ -76,11 +72,6 @@ const AccountPage = () => { ANIMATION_SETTINGS_KEY, INITIAL_ANIMATION_SETTINGS ) - const [hideAccountValue, setHideAccountValue] = useLocalStorageState( - HIDE_ACCOUNT_VALUE_KEY, - false - ) - const [hidePnl, setHidePnl] = useLocalStorageState(HIDE_PNL_KEY, false) useEffect(() => { if (mangoAccountAddress) { @@ -241,72 +232,51 @@ const AccountPage = () => {
-
- -

- {t('account-value')} -

-
- setHideAccountValue(!hideAccountValue)} - > - {hideAccountValue ? ( - - ) : ( - - )} - -
+ +

+ {t('account-value')} +

+
- {!hideAccountValue ? ( - animationSettings['number-scroll'] ? ( - group && mangoAccount ? ( - - ) : ( - - ) + {animationSettings['number-scroll'] ? ( + group && mangoAccount ? ( + ) : ( - {formatFixedDecimals(accountValue, true, true)} + ) ) : ( - ***** + {formatFixedDecimals(accountValue, true, true)} )}
- {!hideAccountValue ? ( - - ) : ( -

*****

- )} +

{t('today')}

{performanceInitialLoad ? ( - !hideAccountValue && oneDayPerformanceData.length ? ( + oneDayPerformanceData.length ? (
@@ -473,28 +443,15 @@ const AccountPage = () => {
-
- -

- {t('pnl')} -

-
- setHidePnl(!hidePnl)} - > - {hidePnl ? ( - - ) : ( - - )} - -
+ +

+ {t('pnl')} +

+
{mangoAccountAddress ? (
{performanceData.length > 4 ? ( @@ -521,18 +478,14 @@ const AccountPage = () => { ) : null}

- {!hidePnl ? formatFixedDecimals(accountPnl, true, true) : '*****'} + {formatFixedDecimals(accountPnl, true, true)}

- {!hidePnl ? ( - - ) : ( -

*****

- )} +

{t('today')}

diff --git a/components/account/MangoAccountSummary.tsx b/components/account/MangoAccountSummary.tsx index c0275cb4..8fee7e0c 100644 --- a/components/account/MangoAccountSummary.tsx +++ b/components/account/MangoAccountSummary.tsx @@ -8,8 +8,6 @@ import { useTranslation } from 'next-i18next' import useMangoAccount from 'hooks/useMangoAccount' import useMangoGroup from 'hooks/useMangoGroup' import { useMemo } from 'react' -import useLocalStorageState from 'hooks/useLocalStorageState' -import { HIDE_ACCOUNT_VALUE_KEY, HIDE_PNL_KEY } from 'utils/constants' const SummaryItem = ({ label, value }: { label: string; value: string }) => { return ( @@ -25,8 +23,6 @@ const MangoAccountSummary = () => { const { group } = useMangoGroup() const { mangoAccount } = useMangoAccount() const performanceData = mangoStore((s) => s.mangoAccount.performance.data) - const [hideAccountValue] = useLocalStorageState(HIDE_ACCOUNT_VALUE_KEY, true) - const [hidePnl] = useLocalStorageState(HIDE_PNL_KEY, true) const [accountValue, freeCollateral, health] = useMemo(() => { if (!group || !mangoAccount) return [0, 0, 0] @@ -62,11 +58,7 @@ const MangoAccountSummary = () => {
{
) diff --git a/utils/constants.ts b/utils/constants.ts index f08cfd72..6f143fa4 100644 --- a/utils/constants.ts +++ b/utils/constants.ts @@ -45,10 +45,6 @@ export const RPC_PROVIDER_KEY = 'rpcProviderKey-0.4' export const PRIORITY_FEE_KEY = 'priorityFeeKey-0.1' -export const HIDE_ACCOUNT_VALUE_KEY = 'hideAccountValue-0.1' - -export const HIDE_PNL_KEY = 'hidePnl-0.1' - // Unused export const PROFILE_CATEGORIES = [ 'borrower',