api icon indicating copy to clipboard operation
api copied to clipboard

Provide formatted money values

Open jakehwll opened this issue 4 years ago • 1 comments

Hey guys

Without doing more regex magic as I mentioned previously, perhaps a prettyValue key would be nice for transactions.

Currently I have setup to use $-1.00 however in app it uses -$1.00. An if and strip could obviously resolve this but, just for expansions sake?

https://upbank.netlify.app/activity

image

jakehwll avatar Aug 22 '20 11:08 jakehwll

This is one reason we expose the value, valueInBaseUnits along with the currencyCode (it maps nicely to money libraries designed to deal with currency), but providing a formatted example is certainly an interesting idea for use cases where the value isn't needed for any arithmetic type operations and purely for display 🤔

d11wtq avatar Aug 22 '20 23:08 d11wtq