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:
parent
c2a1cbd20f
commit
751256f158
@ -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
|
||||
|
@ -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;
|
||||
|
@ -0,0 +1,2 @@
|
||||
-- AlterEnum
|
||||
ALTER TYPE "AssetClass" ADD VALUE 'REAL_ESTATE';
|
@ -0,0 +1,2 @@
|
||||
-- AlterEnum
|
||||
ALTER TYPE "AssetSubClass" ADD VALUE 'PRECIOUS_METAL';
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user