diff --git a/apps/client/src/app/services/import-transactions.service.ts b/apps/client/src/app/services/import-transactions.service.ts index 55a5522bb..d3baa13a4 100644 --- a/apps/client/src/app/services/import-transactions.service.ts +++ b/apps/client/src/app/services/import-transactions.service.ts @@ -214,12 +214,15 @@ export class ImportTransactionsService { for (const key of ImportTransactionsService.TYPE_KEYS) { if (item[key]) { - if (item[key].toLowerCase() === 'buy') { - return Type.BUY; - } else if (item[key].toLowerCase() === 'sell') { - return Type.SELL; - } else if (item[key].toLowerCase() === 'dividend') { - return Type.DIVIDEND; + switch (item[key].toLowerCase()) { + case 'buy': + return Type.BUY; + case 'dividend': + return Type.DIVIDEND; + case 'sell': + return Type.SELL; + default: + break; } } }