diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d228c76b..87ebc2c74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Improved the check for duplicates in the preview step of the activities import (allow different accounts) - Improved the usability and validation in the cash balance transfer from one to another account - Changed the checkboxes to slide toggles in the overview of the admin control panel - Switched from the deprecated (`PUT`) to the new endpoint (`POST`) to manage historical market data in the asset profile details dialog of the admin control panel diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.ts index 8fd35f8dd..96cceff54 100644 --- a/apps/api/src/app/import/import.service.ts +++ b/apps/api/src/app/import/import.service.ts @@ -83,6 +83,7 @@ export class ImportService { const isDuplicate = orders.some((activity) => { return ( + activity.accountId === Account?.id && activity.SymbolProfile.currency === assetProfile.currency && activity.SymbolProfile.dataSource === assetProfile.dataSource && isSameDay(activity.date, parseDate(dateString)) && @@ -482,6 +483,7 @@ export class ImportService { const date = parseISO((dateString)); const isDuplicate = existingActivities.some((activity) => { return ( + activity.accountId === accountId && activity.SymbolProfile.currency === currency && activity.SymbolProfile.dataSource === dataSource && isSameDay(activity.date, date) &&