Browse Source

Task/add asset profile to portfolio position interface (part 2) (#6500)

* Add currency to asset profile
pull/6502/head
Thomas Kaul 1 day ago
committed by GitHub
parent
commit
7ac32ee6f3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      apps/api/src/app/portfolio/portfolio.service.ts
  2. 2
      libs/common/src/lib/interfaces/portfolio-position.interface.ts
  3. 7
      libs/ui/src/lib/mocks/holdings.ts

2
apps/api/src/app/portfolio/portfolio.service.ts

@ -628,6 +628,7 @@ export class PortfolioService {
assetSubClass: assetProfile.assetSubClass, assetSubClass: assetProfile.assetSubClass,
countries: assetProfile.countries, countries: assetProfile.countries,
dataSource: assetProfile.dataSource, dataSource: assetProfile.dataSource,
currency: assetProfile.currency,
holdings: assetProfile.holdings.map( holdings: assetProfile.holdings.map(
({ allocationInPercentage, name }) => { ({ allocationInPercentage, name }) => {
return { return {
@ -1699,6 +1700,7 @@ export class PortfolioService {
assetClass: AssetClass.LIQUIDITY, assetClass: AssetClass.LIQUIDITY,
assetSubClass: AssetSubClass.CASH, assetSubClass: AssetSubClass.CASH,
assetProfile: { assetProfile: {
currency,
assetClass: AssetClass.LIQUIDITY, assetClass: AssetClass.LIQUIDITY,
assetSubClass: AssetSubClass.CASH, assetSubClass: AssetSubClass.CASH,
countries: [], countries: [],

2
libs/common/src/lib/interfaces/portfolio-position.interface.ts

@ -22,6 +22,7 @@ export interface PortfolioPosition {
| 'assetClass' | 'assetClass'
| 'assetSubClass' | 'assetSubClass'
| 'countries' | 'countries'
| 'currency'
| 'dataSource' | 'dataSource'
| 'holdings' | 'holdings'
| 'name' | 'name'
@ -42,6 +43,7 @@ export interface PortfolioPosition {
/** @deprecated */ /** @deprecated */
countries: Country[]; countries: Country[];
/** @deprecated */
currency: string; currency: string;
/** @deprecated */ /** @deprecated */

7
libs/ui/src/lib/mocks/holdings.ts

@ -17,6 +17,7 @@ export const holdings: PortfolioPosition[] = [
weight: 1 weight: 1
} }
], ],
currency: 'USD',
dataSource: 'YAHOO', dataSource: 'YAHOO',
holdings: [], holdings: [],
sectors: [ sectors: [
@ -81,6 +82,7 @@ export const holdings: PortfolioPosition[] = [
weight: 1 weight: 1
} }
], ],
currency: 'EUR',
dataSource: 'YAHOO', dataSource: 'YAHOO',
holdings: [], holdings: [],
sectors: [ sectors: [
@ -145,6 +147,7 @@ export const holdings: PortfolioPosition[] = [
weight: 1 weight: 1
} }
], ],
currency: 'USD',
dataSource: 'YAHOO', dataSource: 'YAHOO',
holdings: [], holdings: [],
sectors: [ sectors: [
@ -202,6 +205,7 @@ export const holdings: PortfolioPosition[] = [
assetClass: 'LIQUIDITY', assetClass: 'LIQUIDITY',
assetSubClass: 'CASH', assetSubClass: 'CASH',
countries: [], countries: [],
currency: 'USD',
dataSource: 'COINGECKO', dataSource: 'COINGECKO',
holdings: [], holdings: [],
sectors: [], sectors: [],
@ -249,6 +253,7 @@ export const holdings: PortfolioPosition[] = [
weight: 1 weight: 1
} }
], ],
currency: 'USD',
dataSource: 'YAHOO', dataSource: 'YAHOO',
holdings: [], holdings: [],
sectors: [ sectors: [
@ -313,6 +318,7 @@ export const holdings: PortfolioPosition[] = [
weight: 1 weight: 1
} }
], ],
currency: 'USD',
dataSource: 'YAHOO', dataSource: 'YAHOO',
holdings: [], holdings: [],
sectors: [ sectors: [
@ -377,6 +383,7 @@ export const holdings: PortfolioPosition[] = [
weight: 1 weight: 1
} }
], ],
currency: 'USD',
dataSource: 'YAHOO', dataSource: 'YAHOO',
holdings: [], holdings: [],
sectors: [ sectors: [

Loading…
Cancel
Save