From 92c46f35eb775fdd221ad785bbc65446b5c7f0ff Mon Sep 17 00:00:00 2001 From: Tyler Myracle Date: Sun, 21 Jan 2024 03:27:14 -0600 Subject: [PATCH] clean up --- .../features/src/providers/teller/teller.etl.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libs/server/features/src/providers/teller/teller.etl.ts b/libs/server/features/src/providers/teller/teller.etl.ts index 2a09b947..6d295d26 100644 --- a/libs/server/features/src/providers/teller/teller.etl.ts +++ b/libs/server/features/src/providers/teller/teller.etl.ts @@ -141,7 +141,6 @@ export class TellerETL implements IETL { // upsert accounts ...accounts.map((tellerAccount) => { const type = TellerUtil.getType(tellerAccount.type) - const categoryProvider = TellerUtil.tellerTypesToCategory(tellerAccount.type) const classification = AccountUtil.getClassification(type) return this.prisma.account.upsert({ @@ -152,9 +151,9 @@ export class TellerETL implements IETL { }, }, create: { - type, + type: TellerUtil.getType(tellerAccount.type), provider: 'teller', - categoryProvider, + categoryProvider: TellerUtil.tellerTypesToCategory(tellerAccount.type), subcategoryProvider: tellerAccount.subtype ?? 'other', accountConnectionId: connection.id, userId: connection.userId, @@ -264,11 +263,7 @@ export class TellerETL implements IETL { ${details.counterparty?.name ?? ''}, ${type}, ${details.category ?? ''}, - ${ - details.category - ? maybeCategoryByTellerCategory[details.category] - : 'Other' - } + ${maybeCategoryByTellerCategory[details.category ?? ''] ?? 'Other'} )` }) )}