Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

fix: Don't assume that scale=0 means "show cents" #52

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

Manizuca
Copy link

Signed-off-by: Matias Zuniga [email protected]

As mentioned in reactioncommerce/reaction#6519, formatMoney.js multiplies the amount by 100 when the scale is 0, apparently assuming that it means the currency should show the amount in "cents".

Because that's not always true, add a new field called "showCents". Set it as true for most of the currencies with scale=0 (to maintain the current behaviour) except for ISK and CLP, where i know this shouldn't happen.

@Akarshit Akarshit self-requested a review May 12, 2021 07:43
@Akarshit Akarshit self-assigned this May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants