refactor: replace ignored numeric literals with constants

This commit is contained in:
2026-09-28 16:37:01 +03:00
committed by ksv741
parent a970eaaf7a
commit b78c215ff1
60 changed files with 510 additions and 283 deletions
@@ -30,6 +30,8 @@ import {
rangeBuckets,
} from './income-period';
const STALE_FRESHNESS_MS = 0;
type Total = {
coupon: ReturnType<typeof decimalFromString>;
dividend: ReturnType<typeof decimalFromString>;
@@ -120,7 +122,7 @@ export class IncomeAnalyticsService {
fetchedAt: current.meta.lastSuccessfulAt ?
new Date(current.meta.lastSuccessfulAt) :
null,
freshForMs: current.meta.freshness === 'fresh' ? Infinity : 0,
freshForMs: current.meta.freshness === 'fresh' ? Infinity : STALE_FRESHNESS_MS,
work: work?.id ? { ...work, id: work.id } : null,
coverage: current.meta.coverage,
dependencies,