Browse Source
Feature/improve symbol lookup results by removing currency from name of cryptocurrencies (#4702)
* Improve symbol lookup results by removing currency from name of cryptocurrencies
* Update changelog
pull/4732/head
Thomas Kaul
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
15 additions and
3 deletions
-
CHANGELOG.md
-
apps/api/src/services/data-provider/data-provider.service.ts
|
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
|
### Changed |
|
|
### Changed |
|
|
|
|
|
|
|
|
|
|
|
- Improved the symbol lookup results by removing the currency from the name of cryptocurrencies (experimental) |
|
|
- Harmonized the data providers management style of the admin control panel |
|
|
- Harmonized the data providers management style of the admin control panel |
|
|
- Extended the data providers management of the admin control panel by the asset profile count |
|
|
- Extended the data providers management of the admin control panel by the asset profile count |
|
|
- Restricted the permissions of the demo user |
|
|
- Restricted the permissions of the demo user |
|
|
|
@ -663,9 +663,6 @@ export class DataProviderService { |
|
|
// Only allow symbols with supported currency
|
|
|
// Only allow symbols with supported currency
|
|
|
return currency ? true : false; |
|
|
return currency ? true : false; |
|
|
}) |
|
|
}) |
|
|
.sort(({ name: name1 }, { name: name2 }) => { |
|
|
|
|
|
return name1?.toLowerCase().localeCompare(name2?.toLowerCase()); |
|
|
|
|
|
}) |
|
|
|
|
|
.map((lookupItem) => { |
|
|
.map((lookupItem) => { |
|
|
if (this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION')) { |
|
|
if (this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION')) { |
|
|
if (user.subscription.type === 'Premium') { |
|
|
if (user.subscription.type === 'Premium') { |
|
@ -679,7 +676,21 @@ export class DataProviderService { |
|
|
lookupItem.dataProviderInfo.isPremium = false; |
|
|
lookupItem.dataProviderInfo.isPremium = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
lookupItem.assetSubClass === 'CRYPTOCURRENCY' && |
|
|
|
|
|
user?.Settings?.settings.isExperimentalFeatures |
|
|
|
|
|
) { |
|
|
|
|
|
// Remove DEFAULT_CURRENCY at the end of cryptocurrency names
|
|
|
|
|
|
lookupItem.name = lookupItem.name.replace( |
|
|
|
|
|
new RegExp(` ${DEFAULT_CURRENCY}$`), |
|
|
|
|
|
'' |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return lookupItem; |
|
|
return lookupItem; |
|
|
|
|
|
}) |
|
|
|
|
|
.sort(({ name: name1 }, { name: name2 }) => { |
|
|
|
|
|
return name1?.toLowerCase().localeCompare(name2?.toLowerCase()); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|