Browse Source
Merge branch 'main' into task/improve-account-name-display-in-activities-table
pull/7025/head
Thomas Kaul
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
6 additions and
4 deletions
-
CHANGELOG.md
-
apps/api/src/services/data-provider/data-provider.service.ts
|
|
|
@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
- Improved the dynamic numerical precision for various values in the account detail dialog on mobile |
|
|
|
- Improved the dynamic numerical precision for various values in the holding detail dialog on mobile |
|
|
|
- Improved the account name display in the activities table |
|
|
|
- Optimized the endpoint `GET api/v1/portfolio/holding/:dataSource/:symbol` by improving the processing of the historical market data |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
|
|
|
|
@ -385,10 +385,11 @@ export class DataProviderService implements OnModuleInit { |
|
|
|
response = marketDataByGranularity.reduce((r, marketData) => { |
|
|
|
const { date, marketPrice, symbol } = marketData; |
|
|
|
|
|
|
|
r[symbol] = { |
|
|
|
...(r[symbol] || {}), |
|
|
|
[format(new Date(date), DATE_FORMAT)]: { marketPrice } |
|
|
|
}; |
|
|
|
if (!r[symbol]) { |
|
|
|
r[symbol] = {}; |
|
|
|
} |
|
|
|
|
|
|
|
r[symbol][format(new Date(date), DATE_FORMAT)] = { marketPrice }; |
|
|
|
|
|
|
|
return r; |
|
|
|
}, {}); |
|
|
|
|