Browse Source

Fix all time high

pull/3527/head
Thomas Kaul 1 year ago
parent
commit
ac83787ea9
  1. 7
      apps/api/src/app/benchmark/benchmark.service.ts

7
apps/api/src/app/benchmark/benchmark.service.ts

@ -161,7 +161,10 @@ export class BenchmarkService {
performances: {
allTimeHigh: {
date: allTimeHigh?.date,
performancePercent: performancePercentFromAllTimeHigh
performancePercent:
performancePercentFromAllTimeHigh >= 0
? 0
: performancePercentFromAllTimeHigh
}
},
symbol: benchmarkAssetProfiles[index].symbol,
@ -419,7 +422,7 @@ export class BenchmarkService {
private getMarketCondition(
aPerformanceInPercent: number
): Benchmark['marketCondition'] {
if (aPerformanceInPercent === 0) {
if (aPerformanceInPercent >= 0) {
return 'ALL_TIME_HIGH';
} else if (aPerformanceInPercent <= -0.2) {
return 'BEAR_MARKET';

Loading…
Cancel
Save