diff --git a/web/app/[account]/page.tsx b/web/app/[account]/page.tsx index 2acbd16..50c2b8f 100644 --- a/web/app/[account]/page.tsx +++ b/web/app/[account]/page.tsx @@ -119,7 +119,7 @@ export default async function AccountPage({ params }: { params: Promise<{ accoun Governance - {profile.witnesses_voted_for ?? 0} + {profile.validators_voted_for ?? profile.witnesses_voted_for ?? 0} {profile.proxy ? : "none"} diff --git a/web/app/block/[n]/page.tsx b/web/app/block/[n]/page.tsx index b272f9c..cb03e6b 100644 --- a/web/app/block/[n]/page.tsx +++ b/web/app/block/[n]/page.tsx @@ -152,7 +152,11 @@ export default async function BlockPage({ params }: { params: Promise<{ n: strin {timestamp ? formatUTC(timestamp) : "—"} - {header?.witness ? : "—"} + {header?.validator || header?.witness ? ( + + ) : ( + "—" + )} {txMap.size} {txMap.size === 1 ? "transaction" : "transactions"} · {ops.length} ops diff --git a/web/app/dashboard/page.tsx b/web/app/dashboard/page.tsx index 4a4fb5b..5ca1360 100644 --- a/web/app/dashboard/page.tsx +++ b/web/app/dashboard/page.tsx @@ -17,6 +17,10 @@ export default async function DashboardPage() { const dao = assetAmount(info?.committee_fund as string | undefined); const rewards = assetAmount(info?.total_reward_fund as string | undefined); const liquid = Math.max(0, supply - capital - dao - rewards); + const currentValidator = + (info?.current_validator as string | undefined) ?? + (info?.current_witness as string | undefined) ?? + null; // Recent blocks strip (best-effort; immutable so cached hard). const recentNums = head ? Array.from({ length: 8 }, (_, i) => head - i) : []; @@ -40,7 +44,7 @@ export default async function DashboardPage() { : "—"} + value={currentValidator ? : "—"} /> diff --git a/web/app/page.tsx b/web/app/page.tsx index 4072618..3509a82 100644 --- a/web/app/page.tsx +++ b/web/app/page.tsx @@ -11,7 +11,10 @@ export default async function Home() { const head = info?.head_block_number; const supply = assetAmount(info?.current_supply as string | undefined); const vestFund = assetAmount(info?.total_vesting_fund as string | undefined); - const witness = (info?.current_witness as string | undefined) ?? null; + const witness = + (info?.current_validator as string | undefined) ?? + (info?.current_witness as string | undefined) ?? + null; return (
diff --git a/web/app/validator/manage/page.tsx b/web/app/validator/manage/page.tsx index 4989b65..b30f1d0 100644 --- a/web/app/validator/manage/page.tsx +++ b/web/app/validator/manage/page.tsx @@ -70,7 +70,7 @@ export default function ValidatorManagePage() { if (v) { setUrl(v.url ?? ''); setSigningKey(v.signing_key ?? '') } }).finally(() => { if (!cancelled) setLoading(false) }) withNode((api) => api.getDynamicGlobalProperties()) - .then((dgp) => fetchValidator(dgp.current_witness)) + .then((dgp) => fetchValidator(dgp.current_validator ?? dgp.current_witness)) .then((top) => { if (cancelled || !top?.props) return const fee = (top.props as Record)['validator_declaration_fee'] diff --git a/web/components/tables/ValidatorsTable.tsx b/web/components/tables/ValidatorsTable.tsx index c45ce96..75082cd 100644 --- a/web/components/tables/ValidatorsTable.tsx +++ b/web/components/tables/ValidatorsTable.tsx @@ -47,7 +47,7 @@ export function ValidatorsTable({ api.getAccounts([wallet.account]) .then(([acc]) => { if (cancelled || !acc) return; - setVotedSet(new Set((acc['witness_votes'] as string[] | undefined) ?? [])); + setVotedSet(new Set(((acc['validator_votes'] ?? acc['witness_votes']) as string[] | undefined) ?? [])); setProxy((acc['proxy'] as string | undefined) ?? ""); const levels = (acc['proxied_vsf_votes'] as (string | number)[] | undefined) ?? []; const rawSum = levels.reduce((s, v) => s + assetAmount(v), 0);