Join the discussion on Telegram
Why this matters
The settings page shows an "Indexer Last Ledger" row that is permanently broken. In frontend/src/app/settings/page.tsx:
const INDEXER_URL = process.env.NEXT_PUBLIC_API_URL || "http://localhost:3001/v1";
// ...
const response = await fetch(`${INDEXER_URL}/health`);
const data = await response.json();
if (data.ledger) setLastLedger(data.ledger.toString());
Two problems:
- The health route is mounted at
/health (root), not under /v1 (see backend/src/app.ts — app.use('/health', healthRoutes) and backend/src/routes/v1/index.ts). So ${API_URL}/v1/health (or /v1/v1/health depending on the env value) 404s.
- The health response (
backend/src/routes/health.routes.ts) returns { status, db, indexerLag, uptime } — there is no ledger field. The actual last ledger lives in GET /v1/admin/metrics (indexer.lastLedger), which requires admin auth.
So the row always renders "Unknown"/"Unavailable"/"Error". Either expose the ledger somewhere reachable or remove the row.
Acceptance criteria
Files to touch
frontend/src/app/settings/page.tsx
backend/src/routes/health.routes.ts (if exposing the field)
Out of scope
- Reworking the full admin metrics endpoint.
Join the discussion on Telegram
Why this matters
The settings page shows an "Indexer Last Ledger" row that is permanently broken. In
frontend/src/app/settings/page.tsx:Two problems:
/health(root), not under/v1(seebackend/src/app.ts—app.use('/health', healthRoutes)andbackend/src/routes/v1/index.ts). So${API_URL}/v1/health(or/v1/v1/healthdepending on the env value) 404s.backend/src/routes/health.routes.ts) returns{ status, db, indexerLag, uptime }— there is noledgerfield. The actual last ledger lives inGET /v1/admin/metrics(indexer.lastLedger), which requires admin auth.So the row always renders "Unknown"/"Unavailable"/"Error". Either expose the ledger somewhere reachable or remove the row.
Acceptance criteria
lastLedgerfield to the/healthresponse and point the fetch at the correct/healthpath; or (b) add a small public indexer-status endpoint; or (c) remove the "Indexer Last Ledger" row if no public source is desired.NEXT_PUBLIC_API_URLends in/v1.Files to touch
frontend/src/app/settings/page.tsxbackend/src/routes/health.routes.ts(if exposing the field)Out of scope