|
|
|
@ -216,6 +216,12 @@ export class BenchmarkService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public getPerformancePercentFromAllTimeHigh(performancePercent: number) { |
|
|
|
const isAtAllTimeHigh = performancePercent >= 0; |
|
|
|
|
|
|
|
return isAtAllTimeHigh ? 0 : performancePercent; |
|
|
|
} |
|
|
|
|
|
|
|
public async isBenchmark(symbolProfileId: string): Promise<boolean> { |
|
|
|
const benchmarks = await this.getBenchmarksProperty(); |
|
|
|
|
|
|
|
@ -288,10 +294,9 @@ export class BenchmarkService { |
|
|
|
performances: { |
|
|
|
allTimeHigh: { |
|
|
|
date: allTimeHigh?.date, |
|
|
|
performancePercent: |
|
|
|
performancePercentFromAllTimeHigh >= 0 |
|
|
|
? 0 |
|
|
|
: performancePercentFromAllTimeHigh |
|
|
|
performancePercent: this.getPerformancePercentFromAllTimeHigh( |
|
|
|
performancePercentFromAllTimeHigh |
|
|
|
) |
|
|
|
} |
|
|
|
}, |
|
|
|
symbol: benchmarkAssetProfiles[index].symbol, |
|
|
|
|