fix(portfolio): publish new complete forecast regardless of request window (WealthLedger/backend#55)
Backend verify / commits (pull_request) Successful in 1m22s
Backend verify / security (pull_request) Successful in 1m6s
Backend verify / verify (pull_request) Successful in 6m7s

This commit is contained in:
2026-11-02 22:22:53 +03:00
parent 554410a271
commit e9e0ff8ee6
5 changed files with 182 additions and 29 deletions
@@ -150,7 +150,7 @@ export class UpcomingEventsService {
a.type.localeCompare(b.type) ||
a.ticker.localeCompare(b.ticker),
);
const candidate: undefined | UpcomingEventsDto = ready
const candidate: Omit<UpcomingEventsDto, 'window'> | undefined = ready
? {
accountId,
calculatedAt: new Date().toISOString(),
@@ -163,6 +163,7 @@ export class UpcomingEventsService {
revision: connection.revision,
membershipRevision: connection.membershipRevision,
scopeKey: `events/${JSON.stringify([accountId, window.from, window.to])}`,
replacesLatest: query.from === undefined && query.to === undefined,
portfolio: portfolio.meta,
lastAttempt: hourlyAttempt(
hourly,