Skip to content

Commit

Permalink
Merge pull request #2924 from Adyen/fix/restore_ISK_to_decimal_currency
Browse files Browse the repository at this point in the history
Re-treat Icelandic Krona as a currency with minor units
  • Loading branch information
sponglord authored Oct 28, 2024
2 parents 36f50de + 03692c0 commit eec66da
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
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

0 comments on commit eec66da

Please sign in to comment.