From bff09f529dfa2304b64cab18d25a1710b52eaf17 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 17 Feb 2023 11:20:46 +0100 Subject: [PATCH 1/2] Feature/beautify etf names in asset profiles (#1709) * Beautify ETF names * Update changelog --- CHANGELOG.md | 8 +++++++- .../data-provider/yahoo-finance/yahoo-finance.service.ts | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 159bbfa7d..4eceeb924 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 + +### Changed + +- Beautified the ETF names in the asset profile + ## 1.235.0 - 2023-02-16 ### Changed @@ -1338,7 +1344,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Beautified the ETF names in the symbol profile +- Beautified the ETF names in the asset profile ### Fixed diff --git a/apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts b/apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts index bccc5c648..20895340e 100644 --- a/apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts +++ b/apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts @@ -441,8 +441,10 @@ export class YahooFinanceService implements DataProviderInterface { let name = longName; if (name) { + name = name.replace('Amundi Index Solutions - ', ''); name = name.replace('iShares ETF (CH) - ', ''); name = name.replace('iShares III Public Limited Company - ', ''); + name = name.replace('iShares V PLC - ', ''); name = name.replace('iShares VI Public Limited Company - ', ''); name = name.replace('iShares VII PLC - ', ''); name = name.replace('Multi Units Luxembourg - ', ''); From 85052bc9bca0ecb8c5bbd159a02f4db5e5d3bf48 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 17 Feb 2023 17:29:48 +0100 Subject: [PATCH 2/2] Bugfix/fix buying power calculation with emergency fund tag (#1713) * Fix buying power calculation * Update changelog --- CHANGELOG.md | 4 ++++ apps/api/src/app/portfolio/portfolio.service.ts | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eceeb924..d045aff6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Beautified the ETF names in the asset profile +### Fixed + +- Fixed the buying power calculation if no emergency fund is set but an activity is tagged as _Emergency Fund_ + ## 1.235.0 - 2023-02-16 ### Changed diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 6700eda99..2564d1d49 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -1550,7 +1550,10 @@ export class PortfolioService { userCurrency }).toNumber(); const emergencyFund = new Big( - (user.Settings?.settings as UserSettings)?.emergencyFund ?? 0 + Math.max( + emergencyFundPositionsValueInBaseCurrency, + (user.Settings?.settings as UserSettings)?.emergencyFund ?? 0 + ) ); const fees = this.getFees({ activities, userCurrency }).toNumber(); const firstOrderDate = activities[0]?.date;