From 881c8a4969dd4335b5ba24e9825c2750a0989545 Mon Sep 17 00:00:00 2001 From: tehaulp <114262457+tehaulp@users.noreply.github.com> Date: Thu, 31 Jul 2025 21:32:50 -1000 Subject: [PATCH] feat: added pacific franc currency (#13086) --- .../http/__tests__/currency/admin/currency.spec.ts | 2 +- packages/core/utils/src/defaults/currencies.ts | 9 +++++++++ .../__tests__/currency-module-service.spec.ts | 6 +++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/integration-tests/http/__tests__/currency/admin/currency.spec.ts b/integration-tests/http/__tests__/currency/admin/currency.spec.ts index d1f2628c59..b8db051219 100644 --- a/integration-tests/http/__tests__/currency/admin/currency.spec.ts +++ b/integration-tests/http/__tests__/currency/admin/currency.spec.ts @@ -22,7 +22,7 @@ medusaIntegrationTestRunner({ ) expect(response.status).toEqual(200) - expect(response.data.currencies).toHaveLength(121) + expect(response.data.currencies).toHaveLength(122) expect(response.data.currencies).toEqual( expect.arrayContaining([ expect.objectContaining({ diff --git a/packages/core/utils/src/defaults/currencies.ts b/packages/core/utils/src/defaults/currencies.ts index 08b350dfb4..0ca6d88388 100644 --- a/packages/core/utils/src/defaults/currencies.ts +++ b/packages/core/utils/src/defaults/currencies.ts @@ -1062,6 +1062,15 @@ export const defaultCurrencies: Record = { code: "XOF", name_plural: "CFA francs BCEAO", }, + XPF: { + symbol: "₣", + name: "CFP Franc", + symbol_native: "₣", + decimal_digits: 0, + rounding: 0, + code: "XPF", + name_plural: "CFP francs" + }, YER: { symbol: "YR", name: "Yemeni Rial", diff --git a/packages/modules/currency/integration-tests/__tests__/currency-module-service.spec.ts b/packages/modules/currency/integration-tests/__tests__/currency-module-service.spec.ts index 3689f904c0..c438e55048 100644 --- a/packages/modules/currency/integration-tests/__tests__/currency-module-service.spec.ts +++ b/packages/modules/currency/integration-tests/__tests__/currency-module-service.spec.ts @@ -86,7 +86,7 @@ moduleIntegrationTestRunner({ const [currenciesResult, count] = await service.listAndCountCurrencies({}, {}) - expect(count).toEqual(121) + expect(count).toEqual(122) expect(currenciesResult).toEqual( expect.arrayContaining([ expect.objectContaining({ @@ -123,7 +123,7 @@ moduleIntegrationTestRunner({ const [currenciesResult, count] = await service.listAndCountCurrencies({}, { skip: 5, take: 1 }) - expect(count).toEqual(121) + expect(count).toEqual(122) expect(currenciesResult).toEqual([ expect.objectContaining({ code: "aud", @@ -144,7 +144,7 @@ moduleIntegrationTestRunner({ const serialized = JSON.parse(JSON.stringify(currenciesResult)) - expect(count).toEqual(121) + expect(count).toEqual(122) expect(serialized).toEqual([ { code: "aed",