Skip to content

Commit

Permalink
feat(currency): add EURO support
Browse files Browse the repository at this point in the history
  • Loading branch information
duongdev committed Sep 23, 2024
1 parent ece9fa2 commit 0730c5a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/api/v1/services/exchange-rates.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import prisma from '../../lib/prisma'
const API_KEY = process.env.EXCHANGERATES_API_KEY
const BASE_URL = 'http://api.exchangeratesapi.io/v1/'
const BASE_CURRENCY = 'EUR'
const DEFAULT_SYMBOLS = ['USD', 'JPY', 'AUD', 'VND', 'SGD', 'CNY']
const DEFAULT_SYMBOLS = ['USD', 'EURO', 'JPY', 'AUD', 'VND', 'SGD', 'CNY']
const client = got.extend({
prefixUrl: BASE_URL,
})
Expand Down
10 changes: 9 additions & 1 deletion packages/currency/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ import listCurrencies from './currencies.json'

export * from './formatter'

export const SUPPORTED_CURRENCIES = ['USD', 'JPY', 'AUD', 'VND', 'SGD', 'CNY']
export const SUPPORTED_CURRENCIES = [
'EUR',
'USD',
'JPY',
'AUD',
'VND',
'SGD',
'CNY',
]

export const currencies = listCurrencies.filter((currency) =>
SUPPORTED_CURRENCIES.includes(currency.code),
Expand Down

0 comments on commit 0730c5a

Please sign in to comment.