remove formatting from max swap amount value
This commit is contained in:
parent
3976425d04
commit
a8a8fd9fda
|
@ -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 (
|
||||||
|
|
Loading…
Reference in New Issue