On a Zoo, Hanzo, Pars, SPC or Osage host the validators page listed every L1
in the registry, and /dex rendered the Lux D-Chain markets. The network total
now sums every L1 only on the Lux primary-network explorer, and /dex answers
404 anywhere else. isPrimaryNetworkHost() is the same predicate as
isPrimaryNetworkExplorer(), taking the host from the request.
Co-authored-by: Hanzo Dev <[email protected]>
Zoo and Hanzo run as L2s on the primary network, Pars and Osage as their own
L1s, so "how many validators secure Lux" is a question about all of them. The
Validators page answered with this chain's 6 while the landing page said 21 —
same word, two quantities, one site, and no way for a reader to tell which
question either was answering.
Both numbers were right. The page now shows every network with its own count
beside the total, and says how many answered so a partial sum is never read as
the whole. A network that cannot be read is still listed: dropping it would make
it look like a network with no validators.
The stake beside the landing-page total names its network now. Stake stays
primary-only — each network bonds its own currency and the sum of two currencies
is not a quantity — so leaving it unlabelled next to an all-network validator
count invited reading the two as one ratio.
/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]>
LUX_DECIMALS was 6 in four separate files, each dividing a value the code
itself names nanoLux. Nano is 10^-9. Every staking and balance figure the Lux
explorer rendered was inflated by 1000.
The validators page reported 2,500,000,000,000 LUX staked — against a total
supply of ~2T. An impossible number, and it is reached from lux.cloud's own
"View on explorer" link: an investor reads 2.5B on the dashboard, clicks
through, and sees 2.5T. lux.cloud was right; this was wrong.
Verified against live chain state (platform.getCurrentValidators):
500000000000000000 nLUX -> 500,000,000 LUX per validator
2500000000000000000 nLUX -> 2,500,000,000 LUX total across 5
Four copies of one constant, so the bug shipped four times:
ui/validators/lux/utils.ts · ui/chains/ChainDetailPage.tsx
ui/pages/NetworkOverview.tsx · ui/stats/lux/NetworkStats.tsx
Each still owns its own copy; they should share one, which is the follow-up.
Typecheck shows no new errors in these files (the existing _app.tsx and *.pw.tsx
failures predate this change).
Three UI-correctness fixes surfaced by visual inspection of explore.lux.network:
- DetailedInfo (block/tx/address detail pages): every field label + value
rendered white-on-white because the grid inherited the @luxfi/ui Tamagui
`t_dark` theme color while the page is in light mode. The two most-used
drill-downs were unreadable. Anchor the container to
--color-text-primary and labels to --color-text-secondary so text follows
the app color mode instead of the stray Tamagui theme.
- StatsWidget (home metric cards): the value had no explicit color and
inherited the same Tamagui white -> near-invisible "Total blocks /
transactions / addresses". Anchor to --color-text-primary.
- Validators dashboard + Network Overview: dropped the "Connected" (0/5) and
"Avg Uptime" (0.0%) widgets/columns. platform.getCurrentValidators reports
connected=null and uptime=0 for every validator on the public RPC (the API
node does not track peer uptime), so those numbers were fabricated-looking
zeros. Only chain-verifiable metrics (count, stake, delegation fee,
delegators) remain -- real data, no fake numbers.
Co-authored-by: Hanzo Dev <[email protected]>
The /validators view fetched real validators (5, 2.5e18 weight) but rendered
white-on-white in light mode — data present in DOM, invisible to users. Set
text-[var(--color-text-primary)] on each of the three lux validator component
roots so all text inherits the theme-flipping color token. Also replace the
hardcoded "LUX" stake unit with config.chain.currency.symbol (AI on Hanzo),
matching NetworkStats. No decimals change (6dp is the codebase convention,
consistent with P-chain getMinStake).
- P-chain API returns weight not stakeAmount; fallback to weight when stakeAmount absent
- uptime from API is already 0-100 percentage, not 0-1 fraction; remove double-multiply
- mark connected and stakeAmount as optional to match actual API response shape
* first part of transition
* second part of transition
* remove jest
* bump up node version and playwright version
* update all screenshots because of the new playwright version
* fix tests
* one more screenshot update
* basic components and address page refactoring
* second part of refactoring
* third part of refactoring
* NativeCoinValue component
* more refactoring
* rename TruncatedValue into TruncatedText
* minor fixes
* refactor block details
* fix layout of value and fee in tx table
* update screenshots
* different units for tooltip and stats widget small value fix
* update screenshots
* update tx table screenshot
* fix copy button vertical alignment
* update styles of tx details
* common color for text separator
* remove bold fontWeight from some details items
* address, block, token, pool, user ops details pages
* refactor chain-specific views
* unify grid column template for detailed views
* remove TODO
* update margins for text separator
* update screenshots
* update margin between icon and text for mobile
* rename prop
* update layout of decoded input data
* update screenshots
* fix tac operation and zilliqa quorum snippets