Bugfix/fix duplicate currency conversion in account calculations (#771)
* Fix currency conversion (duplicate) * Update changelog
This commit is contained in:
parent
1a8fc5757a
commit
14773bf1aa
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an issue with the currency conversion (duplicate) in the account calculations
|
||||||
|
|
||||||
## 1.129.0 - 26.03.2022
|
## 1.129.0 - 26.03.2022
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -111,21 +111,21 @@ export class PortfolioServiceNew {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const value = details.accounts[account.id]?.current ?? 0;
|
const valueInBaseCurrency = details.accounts[account.id]?.current ?? 0;
|
||||||
|
|
||||||
const result = {
|
const result = {
|
||||||
...account,
|
...account,
|
||||||
transactionCount,
|
transactionCount,
|
||||||
value,
|
valueInBaseCurrency,
|
||||||
balanceInBaseCurrency: this.exchangeRateDataService.toCurrency(
|
balanceInBaseCurrency: this.exchangeRateDataService.toCurrency(
|
||||||
account.balance,
|
account.balance,
|
||||||
account.currency,
|
account.currency,
|
||||||
userCurrency
|
userCurrency
|
||||||
),
|
),
|
||||||
valueInBaseCurrency: this.exchangeRateDataService.toCurrency(
|
value: this.exchangeRateDataService.toCurrency(
|
||||||
value,
|
valueInBaseCurrency,
|
||||||
account.currency,
|
userCurrency,
|
||||||
userCurrency
|
account.currency
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -106,21 +106,21 @@ export class PortfolioService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const value = details.accounts[account.id]?.current ?? 0;
|
const valueInBaseCurrency = details.accounts[account.id]?.current ?? 0;
|
||||||
|
|
||||||
const result = {
|
const result = {
|
||||||
...account,
|
...account,
|
||||||
transactionCount,
|
transactionCount,
|
||||||
value,
|
valueInBaseCurrency,
|
||||||
balanceInBaseCurrency: this.exchangeRateDataService.toCurrency(
|
balanceInBaseCurrency: this.exchangeRateDataService.toCurrency(
|
||||||
account.balance,
|
account.balance,
|
||||||
account.currency,
|
account.currency,
|
||||||
userCurrency
|
userCurrency
|
||||||
),
|
),
|
||||||
valueInBaseCurrency: this.exchangeRateDataService.toCurrency(
|
value: this.exchangeRateDataService.toCurrency(
|
||||||
value,
|
valueInBaseCurrency,
|
||||||
account.currency,
|
userCurrency,
|
||||||
userCurrency
|
account.currency
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user