feat: reconcile hourly investment resource states

This commit is contained in:
2026-10-09 23:10:50 +03:00
committed by ksv741
parent 5d857de7a5
commit 323b83b582
25 changed files with 445 additions and 86 deletions
@@ -26,6 +26,7 @@ describe('persistent portfolio projection', () => {
repository as never,
{ request: jest.fn().mockResolvedValue(null) } as never,
{ event: jest.fn() } as never,
{ hourly: jest.fn().mockResolvedValue(null) } as never,
);
access.local.mockResolvedValue({
revision: 'private',
@@ -192,7 +193,7 @@ describe('persistent portfolio projection', () => {
});
const partial = await service.read('user', 'all');
expect(partial.data).toBeNull();
expect(partial.meta.availability).toBe('partial');
expect(partial.meta.availability).toBe('temporarily-unavailable');
const saved = await service.saved('user', 'all');
expect(saved.accounts[0].snapshot?.totalsByCurrency).toEqual(
snapshot.totalsByCurrency,