Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Feature/add missing default currency to prepare currencies function (#3042)

Thomas Kaulc002e372855e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f51662bd91..5fc948b024 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improved the language localization for German (`de`)
- Upgraded `prisma` from version `5.9.1` to `5.10.2`
+### Fixed
+
+- Added the missing default currency to the prepare currencies function in the exchange rate data service
+
## 2.55.0 - 2024-02-22
### Added
diff --git a/apps/api/src/services/exchange-rate-data/exchange-rate-data.service.ts b/apps/api/src/services/exchange-rate-data/exchange-rate-data.service.ts
index 2d169737ad..148fac560b 100644
--- a/apps/api/src/services/exchange-rate-data/exchange-rate-data.service.ts
+++ b/apps/api/src/services/exchange-rate-data/exchange-rate-data.service.ts
@@ -451,7 +451,7 @@ export class ExchangeRateDataService {
}
private async prepareCurrencies(): Promise<string[]> {
- let currencies: string[] = [];
+ let currencies: string[] = [DEFAULT_CURRENCY];
(
await this.prismaService.account.findMany({
diff --git a/libs/ui/src/lib/currency-selector/currency-selector.component.ts b/libs/ui/src/lib/currency-selector/currency-selector.component.ts
index 620f0d3eb7..8c94156894 100644
--- a/libs/ui/src/lib/currency-selector/currency-selector.component.ts
+++ b/libs/ui/src/lib/currency-selector/currency-selector.component.ts
@@ -159,7 +159,7 @@ export class CurrencySelectorComponent
private validateRequired() {
const requiredCheck = super.required
- ? !super.value.label || !super.value.value
+ ? !super.value?.label || !super.value?.value
: false;
if (requiredCheck) {