show 2 decimal places for fees
This commit is contained in:
parent
e567782a7d
commit
7679849c7d
|
@ -12,6 +12,10 @@ export function formatMoney(amount: number) {
|
|||
return ENV_CONFIG.moneyMoniker + formatter.format(newAmount).replace('$', '')
|
||||
}
|
||||
|
||||
export function formatMoneyWithDecimals(amount: number) {
|
||||
return ENV_CONFIG.moneyMoniker + amount.toFixed(2)
|
||||
}
|
||||
|
||||
export function formatWithCommas(amount: number) {
|
||||
return formatter.format(Math.floor(amount)).replace('$', '')
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import { Spacer } from './layout/spacer'
|
|||
import { YesNoSelector } from './yes-no-selector'
|
||||
import {
|
||||
formatMoney,
|
||||
formatMoneyWithDecimals,
|
||||
formatPercent,
|
||||
formatWithCommas,
|
||||
} from 'common/util/format'
|
||||
|
@ -347,7 +348,9 @@ function BuyPanel(props: {
|
|||
</div>
|
||||
|
||||
{cpmmFees !== false && (
|
||||
<InfoTooltip text={`Includes ${formatMoney(cpmmFees)} in fees`} />
|
||||
<InfoTooltip
|
||||
text={`Includes ${formatMoneyWithDecimals(cpmmFees)} in fees`}
|
||||
/>
|
||||
)}
|
||||
|
||||
{dpmTooltip && <InfoTooltip text={dpmTooltip} />}
|
||||
|
|
Loading…
Reference in New Issue
Block a user