|
@ -470,8 +470,7 @@ export class PortfolioService { |
|
|
|
|
|
|
|
|
if (withMarkets) { |
|
|
if (withMarkets) { |
|
|
({ markets, marketsAdvanced } = this.getMarkets({ |
|
|
({ markets, marketsAdvanced } = this.getMarkets({ |
|
|
assetProfile, |
|
|
assetProfile |
|
|
valueInBaseCurrency |
|
|
|
|
|
})); |
|
|
})); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -1433,11 +1432,9 @@ export class PortfolioService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private getMarkets({ |
|
|
private getMarkets({ |
|
|
assetProfile, |
|
|
assetProfile |
|
|
valueInBaseCurrency |
|
|
|
|
|
}: { |
|
|
}: { |
|
|
assetProfile: EnhancedSymbolProfile; |
|
|
assetProfile: EnhancedSymbolProfile; |
|
|
valueInBaseCurrency: Big; |
|
|
|
|
|
}) { |
|
|
}) { |
|
|
const markets = { |
|
|
const markets = { |
|
|
[UNKNOWN_KEY]: 0, |
|
|
[UNKNOWN_KEY]: 0, |
|
@ -1499,16 +1496,23 @@ export class PortfolioService { |
|
|
.toNumber(); |
|
|
.toNumber(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
|
|
|
markets[UNKNOWN_KEY] = new Big(markets[UNKNOWN_KEY]) |
|
|
|
|
|
.plus(valueInBaseCurrency) |
|
|
|
|
|
.toNumber(); |
|
|
|
|
|
|
|
|
|
|
|
marketsAdvanced[UNKNOWN_KEY] = new Big(marketsAdvanced[UNKNOWN_KEY]) |
|
|
|
|
|
.plus(valueInBaseCurrency) |
|
|
|
|
|
.toNumber(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
markets[UNKNOWN_KEY] = new Big(1) |
|
|
|
|
|
.minus(markets.developedMarkets) |
|
|
|
|
|
.minus(markets.emergingMarkets) |
|
|
|
|
|
.minus(markets.otherMarkets) |
|
|
|
|
|
.toNumber(); |
|
|
|
|
|
|
|
|
|
|
|
marketsAdvanced[UNKNOWN_KEY] = new Big(1) |
|
|
|
|
|
.minus(marketsAdvanced.asiaPacific) |
|
|
|
|
|
.minus(marketsAdvanced.emergingMarkets) |
|
|
|
|
|
.minus(marketsAdvanced.europe) |
|
|
|
|
|
.minus(marketsAdvanced.japan) |
|
|
|
|
|
.minus(marketsAdvanced.northAmerica) |
|
|
|
|
|
.minus(marketsAdvanced.otherMarkets) |
|
|
|
|
|
.toNumber(); |
|
|
|
|
|
|
|
|
return { markets, marketsAdvanced }; |
|
|
return { markets, marketsAdvanced }; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|