|
|
@ -1,3 +1,4 @@
|
|
|
|
|
|
|
|
import * as currencies from '@dinero.js/currencies';
|
|
|
|
import { getDate, getMonth, getYear, parse, subDays } from 'date-fns';
|
|
|
|
import { getDate, getMonth, getYear, parse, subDays } from 'date-fns';
|
|
|
|
|
|
|
|
|
|
|
|
import { ghostfolioScraperApiSymbolPrefix } from './config';
|
|
|
|
import { ghostfolioScraperApiSymbolPrefix } from './config';
|
|
|
@ -85,12 +86,7 @@ export function isCrypto(aSymbol = '') {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function isCurrency(aSymbol = '') {
|
|
|
|
export function isCurrency(aSymbol = '') {
|
|
|
|
return (
|
|
|
|
return currencies[aSymbol];
|
|
|
|
(aSymbol.includes('CHF') ||
|
|
|
|
|
|
|
|
aSymbol.includes('EUR') ||
|
|
|
|
|
|
|
|
aSymbol.includes('USD')) &&
|
|
|
|
|
|
|
|
aSymbol.length >= 6
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function isGhostfolioScraperApiSymbol(aSymbol = '') {
|
|
|
|
export function isGhostfolioScraperApiSymbol(aSymbol = '') {
|
|
|
|