Browse Source
Bugfix/fix user currency of public page (#761)
* Fix user currency
* Update changelog
pull/760/head
Thomas Kaul
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
14 additions and
2 deletions
-
CHANGELOG.md
-
apps/api/src/app/portfolio/portfolio.service-new.ts
-
apps/api/src/app/portfolio/portfolio.service.ts
|
|
@ -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/), |
|
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
|
|
|
|
|
|
|
## Unreleased |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed an issue with the user currency of the public page |
|
|
|
|
|
|
|
## 1.127.0 - 16.03.2022 |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
@ -307,7 +307,10 @@ export class PortfolioServiceNew { |
|
|
|
const emergencyFund = new Big( |
|
|
|
(user.Settings?.settings as UserSettings)?.emergencyFund ?? 0 |
|
|
|
); |
|
|
|
const userCurrency = this.request.user?.Settings?.currency ?? baseCurrency; |
|
|
|
const userCurrency = |
|
|
|
this.request.user?.Settings?.currency ?? |
|
|
|
user.Settings?.currency ?? |
|
|
|
baseCurrency; |
|
|
|
|
|
|
|
const { orders, portfolioOrders, transactionPoints } = |
|
|
|
await this.getTransactionPoints({ |
|
|
|
|
|
@ -298,7 +298,10 @@ export class PortfolioService { |
|
|
|
const emergencyFund = new Big( |
|
|
|
(user.Settings?.settings as UserSettings)?.emergencyFund ?? 0 |
|
|
|
); |
|
|
|
const userCurrency = this.request.user?.Settings?.currency ?? baseCurrency; |
|
|
|
const userCurrency = |
|
|
|
this.request.user?.Settings?.currency ?? |
|
|
|
user.Settings?.currency ?? |
|
|
|
baseCurrency; |
|
|
|
const portfolioCalculator = new PortfolioCalculator( |
|
|
|
this.currentRateService, |
|
|
|
userCurrency |
|
|
|