fix: add /health/ledger path for NPM-safe dashboard data
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m15s
CI/CD Pipeline / Security Scanning (push) Successful in 2m30s
CI/CD Pipeline / Lint and Format (push) Failing after 13m24s
CI/CD Pipeline / Terraform Validation (push) Failing after 56s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 33s
Validation / validate-genesis (push) Successful in 39s
Validation / validate-terraform (push) Has started running
Validation / validate-kubernetes (push) Has been cancelled
Validation / validate-smart-contracts (push) Has been cancelled
Validation / validate-security (push) Has been cancelled
Validation / validate-documentation (push) Has been cancelled

Query params may be stripped by reverse proxy; use dedicated path for ledger.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 01:17:52 -07:00
parent c10f6e7868
commit 156591d707
3 changed files with 4 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ export type MoneySupply = {
};
async function loadMoneySupply(): Promise<MoneySupply | null> {
for (const path of ['/public/money-supply', '/money-supply/public']) {
for (const path of ['/public/money-supply', '/money-supply/public', '/health/ledger']) {
const res = await fetch(settlementApi(path));
if (res.ok) return res.json();
}

View File

@@ -11,7 +11,7 @@ export type M2Token = DexToken & {
};
async function loadOfficeMoneySupply(): Promise<MoneySupply | null> {
for (const path of ['/public/money-supply', '/money-supply/public']) {
for (const path of ['/public/money-supply', '/money-supply/public', '/health/ledger']) {
const res = await fetch(settlementApi(path));
if (res.ok) return res.json();
}

View File

@@ -57,6 +57,8 @@ export function createSettlementRouter(): Router {
const officeId = settlementOfficeId();
const profile = loadOfficeProfile();
router.get('/health/ledger', (_req, res) => respondPublicMoneySupply(res, officeId));
router.get('/health', async (req, res) => {
let chainStats = { total: 0, active: 0 };
try {