Feature/add support for real estate and precious metal (#878)

* Add support for real estate and precious metal

* Update changelog
This commit is contained in:
Thomas Kaul 2022-04-30 11:49:58 +02:00 committed by GitHub
parent c2a1cbd20f
commit 751256f158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 0 deletions

View File

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added support for commodities (via futures)
- Added support for real estate
### Changed
@ -21,6 +22,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed the import validation for numbers equal 0
- Fixed the color of the spinner in the activities filter component (dark mode)
### Todo
- Apply data migration (`yarn database:migrate`)
## 1.143.0 - 26.04.2022
### Changed

View File

@ -365,6 +365,16 @@ export class YahooFinanceService implements DataProviderInterface {
case 'future':
assetClass = AssetClass.COMMODITY;
assetSubClass = AssetSubClass.COMMODITY;
if (
aPrice?.shortName?.toLowerCase()?.startsWith('gold') ||
aPrice?.shortName?.toLowerCase()?.startsWith('palladium') ||
aPrice?.shortName?.toLowerCase()?.startsWith('platinum') ||
aPrice?.shortName?.toLowerCase()?.startsWith('silver')
) {
assetSubClass = AssetSubClass.PRECIOUS_METAL;
}
break;
case 'mutualfund':
assetClass = AssetClass.EQUITY;

View File

@ -0,0 +1,2 @@
-- AlterEnum
ALTER TYPE "AssetClass" ADD VALUE 'REAL_ESTATE';

View File

@ -0,0 +1,2 @@
-- AlterEnum
ALTER TYPE "AssetSubClass" ADD VALUE 'PRECIOUS_METAL';

View File

@ -185,6 +185,7 @@ enum AssetClass {
COMMODITY
EQUITY
FIXED_INCOME
REAL_ESTATE
}
enum AssetSubClass {
@ -193,6 +194,7 @@ enum AssetSubClass {
CRYPTOCURRENCY
ETF
MUTUALFUND
PRECIOUS_METAL
STOCK
}