diff --git a/.changeset/fluffy-stingrays-invent.md b/.changeset/fluffy-stingrays-invent.md new file mode 100644 index 0000000000..c4102e6b2d --- /dev/null +++ b/.changeset/fluffy-stingrays-invent.md @@ -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 diff --git a/packages/lib/src/utils/constants/currency-decimals.ts b/packages/lib/src/utils/constants/currency-decimals.ts index 13df7e0edc..06d7d175de 100644 --- a/packages/lib/src/utils/constants/currency-decimals.ts +++ b/packages/lib/src/utils/constants/currency-decimals.ts @@ -10,7 +10,6 @@ const CURRENCY_DECIMALS = { GHC: 1, GNF: 1, KMF: 1, - ISK: 1, PYG: 1, RWF: 1, UGX: 1, diff --git a/packages/lib/src/utils/constants/currency-minor-units.ts b/packages/lib/src/utils/constants/currency-minor-units.ts index 6f651f98e1..122846b164 100644 --- a/packages/lib/src/utils/constants/currency-minor-units.ts +++ b/packages/lib/src/utils/constants/currency-minor-units.ts @@ -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 }, diff --git a/packages/playground/src/config/getCurrency.js b/packages/playground/src/config/getCurrency.js index 3f8c6f0a04..9236b2da82 100644 --- a/packages/playground/src/config/getCurrency.js +++ b/packages/playground/src/config/getCurrency.js @@ -13,6 +13,7 @@ const currencies = { HU: 'HUN', ID: 'IDR', IN: 'INR', + IS: 'ISK', JP: 'JPY', KR: 'KRW', MG: 'MGA',