Browse Source
Bugfix/fix mapping for russia in trackinsight data enhancer (#610)
* Fix mapping for Russia
* Update changelog
pull/611/head
Thomas Kaul
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
9 additions and
1 deletions
-
CHANGELOG.md
-
apps/api/src/services/data-provider/data-enhancer/trackinsight/trackinsight.service.ts
|
|
@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
- Fixed an exception with the market state caused by a failed data provider request |
|
|
|
- Fixed an exception in the portfolio position endpoint |
|
|
|
- Fixed the reload of the position detail dialog (with query parameters) |
|
|
|
- Fixed the missing mapping for Russia in the data enhancer for symbol profile data via _Trackinsight_ |
|
|
|
|
|
|
|
## 1.98.0 - 29.12.2021 |
|
|
|
|
|
|
|
|
|
@ -7,6 +7,9 @@ const getJSON = bent('json'); |
|
|
|
export class TrackinsightDataEnhancerService implements DataEnhancerInterface { |
|
|
|
private static baseUrl = 'https://data.trackinsight.com/holdings'; |
|
|
|
private static countries = require('countries-list/dist/countries.json'); |
|
|
|
private static countriesMapping = { |
|
|
|
'Russian Federation': 'Russia' |
|
|
|
}; |
|
|
|
private static sectorsMapping = { |
|
|
|
'Consumer Discretionary': 'Consumer Cyclical', |
|
|
|
'Consumer Defensive': 'Consumer Staples', |
|
|
@ -45,7 +48,11 @@ export class TrackinsightDataEnhancerService implements DataEnhancerInterface { |
|
|
|
for (const [key, country] of Object.entries<any>( |
|
|
|
TrackinsightDataEnhancerService.countries |
|
|
|
)) { |
|
|
|
if (country.name === name) { |
|
|
|
if ( |
|
|
|
country.name === name || |
|
|
|
country.name === |
|
|
|
TrackinsightDataEnhancerService.countriesMapping[name] |
|
|
|
) { |
|
|
|
countryCode = key; |
|
|
|
break; |
|
|
|
} |
|
|
|