fix: public ledger endpoint for dashboard money-supply
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Has been cancelled
CI/CD Pipeline / Security Scanning (push) Has been cancelled
CI/CD Pipeline / Lint and Format (push) Has been cancelled
CI/CD Pipeline / Terraform Validation (push) Has been cancelled
CI/CD Pipeline / Kubernetes Validation (push) Has been cancelled
Validation / validate-genesis (push) Has been cancelled
Validation / validate-terraform (push) Has been cancelled
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
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Has been cancelled
CI/CD Pipeline / Security Scanning (push) Has been cancelled
CI/CD Pipeline / Lint and Format (push) Has been cancelled
CI/CD Pipeline / Terraform Validation (push) Has been cancelled
CI/CD Pipeline / Kubernetes Validation (push) Has been cancelled
Validation / validate-genesis (push) Has been cancelled
Validation / validate-terraform (push) Has been cancelled
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
Add /public/money-supply route and restrict office param to numeric IDs so NPM proxies no longer hit the authenticated /money-supply/:id handler. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -13,9 +13,12 @@ export type MoneySupply = {
|
||||
};
|
||||
|
||||
async function loadMoneySupply(): Promise<MoneySupply | null> {
|
||||
const publicRes = await fetch(settlementApi('/money-supply/public'));
|
||||
const publicRes = await fetch(settlementApi('/public/money-supply'));
|
||||
if (publicRes.ok) return publicRes.json();
|
||||
|
||||
const legacyRes = await fetch(settlementApi('/money-supply/public'));
|
||||
if (legacyRes.ok) return legacyRes.json();
|
||||
|
||||
const apiKey = import.meta.env.VITE_OMNL_API_KEY;
|
||||
if (!apiKey) return null;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export function useOffice24() {
|
||||
fetch(settlementApi('/office')).then((r) => r.json()),
|
||||
fetch(settlementApi('/tokens/m2')).then((r) => r.json()),
|
||||
fetch(exchangeApi('/health')).then((r) => r.json()),
|
||||
fetch(settlementApi('/money-supply/public')).then((r) => (r.ok ? r.json() : null)),
|
||||
fetch(settlementApi('/public/money-supply')).then((r) => (r.ok ? r.json() : null)),
|
||||
]);
|
||||
setOffice(o);
|
||||
setTokens(Array.isArray(t.tokens) ? t.tokens : []);
|
||||
|
||||
Reference in New Issue
Block a user