diff options
author | Sebastian <sebasjm@gmail.com> | 2022-01-10 15:07:35 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-01-10 16:07:26 -0300 |
commit | efaa4af6482a641a8c9dd9a65aac693768534310 (patch) | |
tree | fd93b2e9c5d2da14ed00b311fec258e7a45c91c4 | |
parent | a2591a29afe004986126a4a46a430114923d9251 (diff) |
add format to stringify value
-rw-r--r-- | packages/taler-util/src/amounts.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/taler-util/src/amounts.ts b/packages/taler-util/src/amounts.ts index 25b3a2c8b..cd74cda35 100644 --- a/packages/taler-util/src/amounts.ts +++ b/packages/taler-util/src/amounts.ts @@ -430,6 +430,8 @@ export class Amounts { n = (n * 10) % amountFractionalBase; } } - return s; + + const currencyFormatter = new Intl.NumberFormat("en-US"); + return currencyFormatter.format(Number(s)); } } |