Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Task/remove deprecated SymbolProfile from activity interface (#7360)

Thomas Kaul90a3fed6522c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 94252a0e1f..973fa34651 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
+- Removed the deprecated `SymbolProfile` field from the activity interface
- Refactored the language redirect of the root path from the static file serving configuration to a dedicated middleware
- Upgraded `yahoo-finance2` from version `3.15.4` to `4.0.0`
diff --git a/apps/api/src/app/activities/activities.service.ts b/apps/api/src/app/activities/activities.service.ts
index df616a5dde..459293abdd 100644
--- a/apps/api/src/app/activities/activities.service.ts
+++ b/apps/api/src/app/activities/activities.service.ts
@@ -499,23 +499,6 @@ export class ActivitiesService {
id: balanceItem.id,
isDraft: false,
quantity: 1,
- SymbolProfile: {
- activitiesCount: 0,
- assetClass: AssetClass.LIQUIDITY,
- assetSubClass: AssetSubClass.CASH,
- countries: [],
- createdAt: new Date(balanceItem.date),
- currency: account.currency,
- dataSource:
- this.dataProviderService.getDataSourceForExchangeRates(),
- holdings: [],
- id: account.currency,
- isActive: true,
- name: account.currency,
- sectors: [],
- symbol: account.currency,
- updatedAt: new Date(balanceItem.date)
- },
symbolProfileId: account.currency,
type: ActivityType.BUY,
unitPrice: 1,
@@ -862,8 +845,7 @@ export class ActivitiesService {
feeInBaseCurrency,
unitPriceInAssetProfileCurrency,
value,
- valueInBaseCurrency,
- SymbolProfile: assetProfile
+ valueInBaseCurrency
};
})
);
diff --git a/apps/api/src/app/endpoints/public/public.controller.ts b/apps/api/src/app/endpoints/public/public.controller.ts
index a87d36218e..9bd2a78a84 100644
--- a/apps/api/src/app/endpoints/public/public.controller.ts
+++ b/apps/api/src/app/endpoints/public/public.controller.ts
@@ -129,8 +129,7 @@ export class PublicController {
type,
unitPrice,
value,
- valueInBaseCurrency,
- SymbolProfile: assetProfile
+ valueInBaseCurrency
};
}
);
diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.ts
index 07019e6947..b706baa8d5 100644
--- a/apps/api/src/app/import/import.service.ts
+++ b/apps/api/src/app/import/import.service.ts
@@ -153,7 +153,6 @@ export class ImportService {
feeInBaseCurrency: 0,
id: assetProfile.id,
isDraft: false,
- SymbolProfile: assetProfile,
symbolProfileId: assetProfile.id,
type: 'DIVIDEND',
unitPrice: marketPrice,
@@ -623,9 +622,7 @@ export class ImportService {
assetProfile,
error,
value,
- valueInBaseCurrency,
- // @ts-ignore
- SymbolProfile: assetProfile
+ valueInBaseCurrency
});
}
diff --git a/apps/api/src/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor.ts b/apps/api/src/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor.ts
index 4e75ee9b71..6b38b2d54b 100644
--- a/apps/api/src/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor.ts
+++ b/apps/api/src/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor.ts
@@ -80,10 +80,6 @@ export class TransformDataSourceInResponseInterceptor<
paths: [
'activities[*].assetProfile.dataSource',
'activities[*].dataSource',
-
- /* @deprecated */
- 'activities[*].SymbolProfile.dataSource',
-
'assetProfile.dataSource',
'benchmarks[*].dataSource',
'errors[*].dataSource',
@@ -92,10 +88,6 @@ export class TransformDataSourceInResponseInterceptor<
'holdings[*].assetProfile.dataSource',
'holdings[*].dataSource',
'items[*].dataSource',
-
- /* @deprecated */
- 'SymbolProfile.dataSource',
-
'watchlist[*].dataSource'
]
});
diff --git a/libs/common/src/lib/config.ts b/libs/common/src/lib/config.ts
index a5363372a9..6b070755f2 100644
--- a/libs/common/src/lib/config.ts
+++ b/libs/common/src/lib/config.ts
@@ -110,13 +110,6 @@ export const DEFAULT_REDACTED_PATHS = [
'activities[*].feeInAssetProfileCurrency',
'activities[*].feeInBaseCurrency',
'activities[*].quantity',
-
- /* @deprecated */
- 'activities[*].SymbolProfile.symbolMapping',
-
- /* @deprecated */
- 'activities[*].SymbolProfile.watchedByCount',
-
'activities[*].value',
'activities[*].valueInBaseCurrency',
'balance',
@@ -147,13 +140,6 @@ export const DEFAULT_REDACTED_PATHS = [
'platforms[*].balance',
'platforms[*].valueInBaseCurrency',
'quantity',
-
- /* @deprecated */
- 'SymbolProfile.symbolMapping',
-
- /* @deprecated */
- 'SymbolProfile.watchedByCount',
-
'totalBalanceInBaseCurrency',
'totalDividendInBaseCurrency',
'totalInterestInBaseCurrency',
diff --git a/libs/common/src/lib/interfaces/activities.interface.ts b/libs/common/src/lib/interfaces/activities.interface.ts
index 1cc867d6e3..66c310cf4c 100644
--- a/libs/common/src/lib/interfaces/activities.interface.ts
+++ b/libs/common/src/lib/interfaces/activities.interface.ts
@@ -9,12 +9,6 @@ export interface Activity extends Order {
error?: ActivityError;
feeInAssetProfileCurrency: number;
feeInBaseCurrency: number;
-
- /**
- * @deprecated Use `assetProfile` instead
- */
- SymbolProfile?: EnhancedSymbolProfile;
-
tagIds?: string[];
tags?: Tag[];
unitPriceInAssetProfileCurrency: number;
diff --git a/libs/common/src/lib/interfaces/responses/public-portfolio-response.interface.ts b/libs/common/src/lib/interfaces/responses/public-portfolio-response.interface.ts
index 04c8e0c073..3302f635a7 100644
--- a/libs/common/src/lib/interfaces/responses/public-portfolio-response.interface.ts
+++ b/libs/common/src/lib/interfaces/responses/public-portfolio-response.interface.ts
@@ -27,12 +27,6 @@ export interface PublicPortfolioResponse extends PublicPortfolioResponseV1 {
'currency' | 'date' | 'fee' | 'quantity' | 'type' | 'unitPrice'
> & {
assetProfile?: EnhancedSymbolProfile;
-
- /**
- * @deprecated Use `assetProfile` instead
- */
- SymbolProfile?: EnhancedSymbolProfile;
-
value: number;
valueInBaseCurrency: number;
})[];