Skip to content

refactor(services): collapse indexer onto core and transport modules, delete dead paths - #727

Merged
Calebux merged 1 commit into
zintarh:mainfrom
No-bodyq:fix/587-consolidate-indexer
Oct 1, 2026
Merged

Calebux merged 1 commit into
zintarh:mainfrom
No-bodyq:fix/587-consolidate-indexer

Conversation

@No-bodyq

Copy link
Copy Markdown
Contributor

I traced every indexer module to its consumers. indexerCore.ts is the core: it fetches Horizon history and computes the result. The transport layer is indexerService.ts, the browser entry point with IndexedDB caching used by the loading page, and indexerServer.ts, the entry point the /api/wrapped route uses. multiTimeframeIndexer.ts runs the browser transport across several periods and is reached through multiTimeframeStore on the connect page.

indexerRecoveryService.ts was only imported by useIndexerRecovery, which nothing uses, so I deleted both. Under src/ I deleted the placeholder src/services/indexerService.ts mock and the src/services/indexer/ tree, whose index only re-exported an interface for an indexer that was never implemented. The Horizon record types that the achievement code still uses now live in src/services/achievement/horizonTypes.ts. I also dropped the runIndexingCore re-export from indexerService.ts so callers go through a transport.

For tests, I removed src/services/indexer/__tests__/indexer.service.test.ts, which tested that unimplemented interface, and app/services/__tests__/indexerService.test.ts, a standalone script that exercised its own mock instead of any real module. The remaining indexer tests in app/services/__tests__ cover the surviving modules. The layering is described at the top of indexerCore.ts and in the README's key components table.

Closes #587

@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

@No-bodyq is attempting to deploy a commit to the zintarh Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 28, 2026

Copy link
Copy Markdown

@No-bodyq Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Calebux
Calebux merged commit 42546cd into zintarh:main Oct 1, 2026
3 of 13 checks passed
Calebux pushed a commit that referenced this pull request Oct 6, 2026
Resolve conflicts against main: keep main's stellarAmounts module name and
app/components MultiSig location, drop indexerRecoveryService (deleted on
main in #727), and repoint the remaining src/store imports, including the
MultiSig test added by #712, which also moves next to its component.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(services): five indexer modules in app/services plus a separate tree in src/services/indexer

2 participants