Skip to content

Commit

Permalink
refactor: use default "EUR" instead of explicit argument
Browse files Browse the repository at this point in the history
  • Loading branch information
sirtawast committed Nov 20, 2024
1 parent 5362b33 commit 61c86e7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions frontend/benefit/applicant/browser-tests/utils/fieldMaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ export type ApplicationField = {

const formatFloatToCurrency = (
value: string | number,
currency: 'EUR' | null,
currency: 'EUR' | null = 'EUR',
locale = 'fi-FI'
): string => {
const parsedValue = typeof value === 'string' ? parseFloat(value) : value;
const currencyOptions = currency
? {
style: 'currency',
style: 'currency' as const,
currency,
}
: {};
Expand Down Expand Up @@ -72,15 +72,15 @@ export const mapRequiredForm = (
},
{
testId: 'application-field-monthlyPay',
value: formatFloatToCurrency(form.employee.monthlyPay, 'EUR'),
value: formatFloatToCurrency(form.employee.monthlyPay),
},
{
testId: 'application-field-vacationMoney',
value: formatFloatToCurrency(form.employee.vacationMoney, 'EUR'),
value: formatFloatToCurrency(form.employee.vacationMoney),
},
{
testId: 'application-field-otherExpenses',
value: formatFloatToCurrency(form.employee.otherExpenses, 'EUR'),
value: formatFloatToCurrency(form.employee.otherExpenses),
},
{ testId: 'application-field-paySubsidyGranted', value: 'Palkkatuki' },
{ testId: 'application-field-apprenticeshipProgram', value: null },
Expand Down

0 comments on commit 61c86e7

Please sign in to comment.