|
@ -112,6 +112,10 @@ export class WatchlistService { |
|
|
|
|
|
|
|
|
const watchlist = await Promise.all( |
|
|
const watchlist = await Promise.all( |
|
|
user.watchlist.map(async ({ dataSource, symbol }) => { |
|
|
user.watchlist.map(async ({ dataSource, symbol }) => { |
|
|
|
|
|
const assetProfile = assetProfiles.find((profile) => { |
|
|
|
|
|
return profile.dataSource === dataSource && profile.symbol === symbol; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
const allTimeHigh = await this.marketDataService.getMax({ |
|
|
const allTimeHigh = await this.marketDataService.getMax({ |
|
|
dataSource, |
|
|
dataSource, |
|
|
symbol |
|
|
symbol |
|
@ -123,10 +127,6 @@ export class WatchlistService { |
|
|
quotes[symbol]?.marketPrice |
|
|
quotes[symbol]?.marketPrice |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
const assetProfile = assetProfiles.find((profile) => { |
|
|
|
|
|
return profile.dataSource === dataSource && profile.symbol === symbol; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
dataSource, |
|
|
dataSource, |
|
|
symbol, |
|
|
symbol, |
|
@ -135,8 +135,8 @@ export class WatchlistService { |
|
|
name: assetProfile?.name, |
|
|
name: assetProfile?.name, |
|
|
performances: { |
|
|
performances: { |
|
|
allTimeHigh: { |
|
|
allTimeHigh: { |
|
|
date: allTimeHigh?.date, |
|
|
performancePercent, |
|
|
performancePercent |
|
|
date: allTimeHigh?.date |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|