From dc597cd0aca27b4cd44eb1bc380bf071648a5d75 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 17 Jul 2025 17:14:06 +0200 Subject: [PATCH] Remove assetProfileId and update symbol --- apps/api/src/app/export/export.service.ts | 7 +------ libs/common/src/lib/interfaces/export.interface.ts | 11 +++++++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/api/src/app/export/export.service.ts b/apps/api/src/app/export/export.service.ts index 004c26f39..9c9d20682 100644 --- a/apps/api/src/app/export/export.service.ts +++ b/apps/api/src/app/export/export.service.ts @@ -226,7 +226,6 @@ export class ExportService { unitPrice }) => { return { - assetProfileId: SymbolProfile.userId ? SymbolProfile.id : undefined, accountId, comment, fee, @@ -237,11 +236,7 @@ export class ExportService { currency: currency ?? SymbolProfile.currency, dataSource: SymbolProfile.dataSource, date: date.toISOString(), - symbol: - ['FEE', 'INTEREST', 'LIABILITY'].includes(type) || - (SymbolProfile.dataSource === 'MANUAL' && type === 'BUY') - ? SymbolProfile.name - : SymbolProfile.symbol, + symbol: SymbolProfile.symbol, tags: currentTags.map(({ id: tagId }) => { return tagId; }) diff --git a/libs/common/src/lib/interfaces/export.interface.ts b/libs/common/src/lib/interfaces/export.interface.ts index 2bc400b29..905e33b06 100644 --- a/libs/common/src/lib/interfaces/export.interface.ts +++ b/libs/common/src/lib/interfaces/export.interface.ts @@ -1,4 +1,11 @@ -import { Account, Order, Platform, SymbolProfile, Tag } from '@prisma/client'; +import { + Account, + DataSource, + Order, + Platform, + SymbolProfile, + Tag +} from '@prisma/client'; import { AccountBalance } from './account-balance.interface'; @@ -15,7 +22,7 @@ export interface Export { | 'symbolProfileId' | 'updatedAt' | 'userId' - > & { assetProfileId?: string; date: string; symbol: string })[]; + > & { dataSource: DataSource; date: string; symbol: string })[]; assetProfiles: (Omit & { marketData: { date: string; marketPrice: number }[]; })[];