feat: add cashin bill counter

fix: fiat amount formatting
This commit is contained in:
Sérgio Salgado 2021-12-20 01:16:43 +00:00
parent 219dca7f90
commit 98a2797494
17 changed files with 239 additions and 218 deletions

View file

@ -7,4 +7,7 @@ const transformNumber = value => (isValidNumber(value) ? value : null)
const defaultToZero = value =>
isValidNumber(parseInt(value)) ? parseInt(value) : 0
export { defaultToZero, transformNumber }
const numberToFiatAmount = value =>
value.toLocaleString('en-US', { maximumFractionDigits: 2 })
export { defaultToZero, transformNumber, numberToFiatAmount }