mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
/validators reported "0 validators / 0 LUX staked" about a network running five with 2,500,000,000 LUX bonded. Measured now against the live P-Chain: POST https://api.lux.network/ext/bc/P platform.getCurrentValidators -> 5 validators, sum(weight) 2500000000000000000 nLUX = 2,500,000,000 LUX (P-chain figures are nLUX, 1e9 — and the rows carry `weight`, not `stakeAmount`, which is why the reader already falls back.) useCurrentValidators returns a ZEROED ValidatorStats when the query fails, and a zeroed stat is indistinguishable from a chain with no validators. NetworkOverview and NetworkStats each guarded against that with their own copy of `!isError && validatorCount > 0`; ValidatorsPage and ValidatorsDashboard had no guard at all, so they rendered the zeros — "Validators (0)", "Delegators (0)", "0 LUX Total Stake" — as if measured. The question "did the read answer?" now has exactly one answer, computed where the read happens: the hook exports `isKnown`. The two ad-hoc copies are gone and the two unguarded surfaces use it, showing an em dash and naming the method that did not answer. Also restores module resolution. 258bd1a48 dropped `baseUrl: "."` from tsconfig on the grounds that `paths` already covered it — but `paths` was `{}`, so baseUrl alone was resolving every absolute import in the repo ("configs/app", "lib/api/pchain", "ui/..."). Without it tsc could not resolve a single one. `"*": ["./*"]` is the same rule in the form TS7 accepts: tsc goes from thousands of TS2307 to 1. Co-authored-by: Hanzo Dev <[email protected]>
51 lines
1.4 KiB
JSON
51 lines
1.4 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"target": "es2017",
|
|
"lib": [
|
|
"dom",
|
|
"dom.iterable",
|
|
"esnext"
|
|
],
|
|
"allowJs": true,
|
|
"skipLibCheck": true,
|
|
"strict": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"noEmit": true,
|
|
"esModuleInterop": true,
|
|
"module": "ESNext",
|
|
"moduleResolution": "Bundler",
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"jsx": "react-jsx",
|
|
"incremental": true,
|
|
// TS7 removed `baseUrl`, and this project's absolute imports ("configs/app",
|
|
// "lib/api/pchain", "ui/...") were resolved by `baseUrl: "."` alone — `paths`
|
|
// was empty, so dropping baseUrl left nothing to resolve them and tsc could
|
|
// not typecheck a single file. `"*": ["./*"]` is the same rule expressed the
|
|
// way TS7 accepts: targets resolve relative to this tsconfig's directory.
|
|
"paths": { "*": [ "./*" ] },
|
|
"types": [
|
|
"node"
|
|
]
|
|
},
|
|
"include": [
|
|
"next-env.d.ts",
|
|
"**/*.ts",
|
|
"**/*.node.ts",
|
|
"**/*.tsx",
|
|
"**/*.pw.tsx",
|
|
"decs.d.ts",
|
|
"global.d.ts"
|
|
],
|
|
"exclude": [
|
|
"node_modules",
|
|
"node_modules_linux",
|
|
"./deploy/tools/envs-validator",
|
|
"./deploy/tools/favicon-generator",
|
|
"./deploy/tools/multichain-config-generator",
|
|
"./deploy/tools/essential-dapps-chains-config-generator",
|
|
"./toolkit/package",
|
|
"./deploy/tools/llms-txt-generator"
|
|
]
|
|
}
|