import { percentFormat } from '../utils/index' import useSrmAccount from '../hooks/useSrmAccount' import { MSRM_DECIMALS, SRM_DECIMALS, } from '@project-serum/serum/lib/token-instructions' import Tooltip from './Tooltip' import { InformationCircleIcon } from '@heroicons/react/outline' import { useTranslation } from 'next-i18next' import Button from './Button' import useMangoStore from '../stores/useMangoStore' import { msrmMints, ZERO_BN } from '@blockworks-foundation/mango-client' import DepositMsrmModal from './DepositMsrmModal' import WithdrawMsrmModal from './WithdrawMsrmModal' import { useState } from 'react' const FeeDiscountsTable = () => { const { t } = useTranslation('common') const mangoAccount = useMangoStore((s) => s.selectedMangoAccount.current) const connected = useMangoStore((s) => s.wallet.connected) const walletTokens = useMangoStore((s) => s.wallet.tokens) const { totalSrm, totalMsrm, rates } = useSrmAccount() const [showDeposit, setShowDeposit] = useState(false) const [showWithdraw, setShowWithdraw] = useState(false) const cluster = useMangoStore.getState().connection.cluster const ownerMsrmAccount = walletTokens.find((t) => t.account.mint.equals(msrmMints[cluster]) ) return (