Feature/clean up initial values from x ray (#1914)

* Clean up initial (original) values from X-Ray

* Refactor current to valueInBaseCurrency

* Update changelog
This commit is contained in:
Thomas Kaul
2023-05-01 17:16:02 +02:00
committed by GitHub
parent 90fe467114
commit 1ca3792a4b
12 changed files with 30 additions and 282 deletions

View File

@@ -249,13 +249,22 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
public initializeAnalysisData() {
this.initialize();
for (const [id, { current, name }] of Object.entries(
this.portfolioDetails.accounts
)) {
for (const [
id,
{ name, valueInBaseCurrency, valueInPercentage }
] of Object.entries(this.portfolioDetails.accounts)) {
let value = 0;
if (this.hasImpersonationId) {
value = valueInPercentage;
} else {
value = valueInBaseCurrency;
}
this.accounts[id] = {
id,
name,
value: current
value
};
}