Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-treat Icelandic Krona as a currency with minor units #2924

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fluffy-stingrays-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@adyen/adyen-web': patch
---

Revert Icelandic Krona to be treated as a currency with minor units, in order to align with our documentation
1 change: 0 additions & 1 deletion packages/lib/src/utils/constants/currency-decimals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const CURRENCY_DECIMALS = {
GHC: 1,
GNF: 1,
KMF: 1,
ISK: 1,
PYG: 1,
RWF: 1,
UGX: 1,
Expand Down
3 changes: 2 additions & 1 deletion packages/lib/src/utils/constants/currency-minor-units.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** Work around solution until chromium bug is fixed https://bugs.chromium.org/p/chromium/issues/detail?id=1381996
* We need to hardcode minimumFractionDigits for the following currencies
* We need to hardcode minimumFractionDigits for the following currencies in order to force them to have 2 decimal places and
* not be rounded up to a major unit
*/
export const currencyMinorUnitsConfig = {
RSD: { minimumFractionDigits: 2 },
Expand Down
1 change: 1 addition & 0 deletions packages/playground/src/config/getCurrency.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const currencies = {
HU: 'HUN',
ID: 'IDR',
IN: 'INR',
IS: 'ISK',
JP: 'JPY',
KR: 'KRW',
MG: 'MGA',
Expand Down
Loading