diff --git a/CHANGELOG.md b/CHANGELOG.md index 5db73ad9f1..85f1b0f60c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed the missing platform icon in the preview step of the activities import - Fixed the link of the _Manage Asset Profile_ button in the holding detail dialog before the holding has loaded ## 3.85.0 - 2026-10-12 diff --git a/apps/api/src/app/import/import.service.spec.ts b/apps/api/src/app/import/import.service.spec.ts index 992ed353f3..d6d41134a5 100644 --- a/apps/api/src/app/import/import.service.spec.ts +++ b/apps/api/src/app/import/import.service.spec.ts @@ -69,7 +69,7 @@ describe('ImportService', () => { importService = new ImportService( { - getAccounts: jest.fn().mockResolvedValue([]) + accounts: jest.fn().mockResolvedValue([]) } as unknown as AccountService, { createActivity, diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.ts index 7616cd927b..1dbba4e137 100644 --- a/apps/api/src/app/import/import.service.ts +++ b/apps/api/src/app/import/import.service.ts @@ -38,6 +38,7 @@ import { } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { + AccountWithPlatform, AccountWithValue, OrderWithAccount, UserWithSettings @@ -769,11 +770,14 @@ export class ImportService { userId: user.id }); - const accounts = (await this.accountService.getAccounts(user.id)).map( - ({ id, name }) => { - return { id, name }; - } - ); + const accounts: Pick[] = ( + await this.accountService.accounts({ + include: { platform: true }, + where: { userId: user.id } + }) + ).map(({ id, name, platform }) => { + return { id, name, platform }; + }); if (isDryRun) { accountsWithBalancesDto @@ -888,7 +892,7 @@ export class ImportService { let order: | OrderWithAccount | (Omit & { - account?: { id: string; name: string }; + account?: Pick; tags?: { id: string; name: string }[]; });