diff --git a/CHANGELOG.md b/CHANGELOG.md index 55257d015..35489f228 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Upgraded the _Stripe_ dependencies - Upgraded `ngx-stripe` from version `19.0.0` to `19.7.0` +### Fixed + +- Fixed an exception with currencies in the historical market data editor of the admin control panel + ## 2.165.0 - 2025-05-31 ### Added diff --git a/apps/api/src/app/endpoints/market-data/market-data.controller.ts b/apps/api/src/app/endpoints/market-data/market-data.controller.ts index 933e70e9d..96fca1b3c 100644 --- a/apps/api/src/app/endpoints/market-data/market-data.controller.ts +++ b/apps/api/src/app/endpoints/market-data/market-data.controller.ts @@ -85,7 +85,7 @@ export class MarketDataController { { dataSource, symbol } ]); - if (!assetProfile) { + if (!assetProfile && !isCurrency(getCurrencyFromSymbol(symbol))) { throw new HttpException( getReasonPhrase(StatusCodes.NOT_FOUND), StatusCodes.NOT_FOUND @@ -103,7 +103,7 @@ export class MarketDataController { ); const canUpsertOwnAssetProfile = - assetProfile.userId === this.request.user.id && + assetProfile?.userId === this.request.user.id && hasPermission( this.request.user.permissions, permissions.createMarketDataOfOwnAssetProfile