remove formatting from max swap amount value

This commit is contained in:
saml33 2023-04-06 11:15:22 +10:00
parent 3976425d04
commit a8a8fd9fda
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import MaxAmountButton from '@components/shared/MaxAmountButton'
import mangoStore from '@store/mangoStore' import mangoStore from '@store/mangoStore'
import Decimal from 'decimal.js' import Decimal from 'decimal.js'
import { useTranslation } from 'next-i18next' import { useTranslation } from 'next-i18next'
import { formatNumericValue } from 'utils/numbers' import { floorToDecimal } from 'utils/numbers'
import { useTokenMax } from './useTokenMax' import { useTokenMax } from './useTokenMax'
const MaxSwapAmount = ({ const MaxSwapAmount = ({
@ -23,7 +23,7 @@ const MaxSwapAmount = ({
if (mangoAccountLoading) return null if (mangoAccountLoading) return null
const setMax = (value: Decimal) => { const setMax = (value: Decimal) => {
setAmountIn(formatNumericValue(value, decimals)) setAmountIn(floorToDecimal(value, decimals).toFixed())
} }
return ( return (