diff --git a/.changeset/witty-spies-move.md b/.changeset/witty-spies-move.md new file mode 100644 index 0000000000..8f161e881c --- /dev/null +++ b/.changeset/witty-spies-move.md @@ -0,0 +1,7 @@ +--- +"@medusajs/currency": patch +"@medusajs/dashboard": patch +"@medusajs/utils": patch +--- + +feat(dashboard,currency): added Tajikistani somoni currency diff --git a/integration-tests/http/__tests__/currency/admin/currency.spec.ts b/integration-tests/http/__tests__/currency/admin/currency.spec.ts index b8db051219..88382b1013 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(122) + expect(response.data.currencies).toHaveLength(123) expect(response.data.currencies).toEqual( expect.arrayContaining([ expect.objectContaining({ diff --git a/packages/admin/dashboard/src/lib/data/currencies.ts b/packages/admin/dashboard/src/lib/data/currencies.ts index b9d523659d..01f3a85a49 100644 --- a/packages/admin/dashboard/src/lib/data/currencies.ts +++ b/packages/admin/dashboard/src/lib/data/currencies.ts @@ -631,6 +631,12 @@ export const currencies: Record = { symbol_native: "T$", decimal_digits: 2, }, + TJS: { + code: "TJS", + name: "Tajikistani Somoni", + symbol_native: "с.", + decimal_digits: 2, + }, TRY: { code: "TRY", name: "Turkish Lira", diff --git a/packages/core/utils/src/defaults/currencies.ts b/packages/core/utils/src/defaults/currencies.ts index 0ca6d88388..5f3425ce15 100644 --- a/packages/core/utils/src/defaults/currencies.ts +++ b/packages/core/utils/src/defaults/currencies.ts @@ -954,6 +954,15 @@ export const defaultCurrencies: Record = { code: "TOP", name_plural: "Tongan paʻanga", }, + TJS: { + symbol: "TJS", + name: "Tajikistani Somoni", + symbol_native: "с.", + decimal_digits: 2, + rounding: 0, + code: "TJS", + name_plural: "Tajikistani somonis", + }, TRY: { symbol: "₺", name: "Turkish Lira", 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 c438e55048..3387a3aa46 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(122) + expect(count).toEqual(123) 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(122) + expect(count).toEqual(123) expect(currenciesResult).toEqual([ expect.objectContaining({ code: "aud", @@ -144,7 +144,7 @@ moduleIntegrationTestRunner({ const serialized = JSON.parse(JSON.stringify(currenciesResult)) - expect(count).toEqual(122) + expect(count).toEqual(123) expect(serialized).toEqual([ { code: "aed",