|
@ -226,7 +226,7 @@ export class PortfolioService { |
|
|
interestInBaseCurrency, |
|
|
interestInBaseCurrency, |
|
|
transactionCount, |
|
|
transactionCount, |
|
|
valueInBaseCurrency, |
|
|
valueInBaseCurrency, |
|
|
allocationInPercentage: null, // TODO
|
|
|
allocationInPercentage: 0, |
|
|
balanceInBaseCurrency: this.exchangeRateDataService.toCurrency( |
|
|
balanceInBaseCurrency: this.exchangeRateDataService.toCurrency( |
|
|
account.balance, |
|
|
account.balance, |
|
|
account.currency, |
|
|
account.currency, |
|
@ -298,6 +298,11 @@ export class PortfolioService { |
|
|
transactionCount += account.transactionCount; |
|
|
transactionCount += account.transactionCount; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (const account of accounts) { |
|
|
|
|
|
account.allocationInPercentage = |
|
|
|
|
|
account.valueInBaseCurrency / totalValueInBaseCurrency.toNumber(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
accounts, |
|
|
accounts, |
|
|
transactionCount, |
|
|
transactionCount, |
|
|