mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-13 03:24:09 +00:00
formatAmounts wip
This commit is contained in:
parent
969a389836
commit
b3b4887fdb
10
src/logic/tokens/utils/formatAmounts.js
Normal file
10
src/logic/tokens/utils/formatAmounts.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// @flow
|
||||||
|
export const formatAmount = (number: string | number) => {
|
||||||
|
let numberFloat = parseFloat(number)
|
||||||
|
|
||||||
|
if (numberFloat < 999.999999) {
|
||||||
|
numberFloat = numberFloat.toFixed(2).toLocaleString()
|
||||||
|
}
|
||||||
|
|
||||||
|
return numberFloat
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user