fix(ui): head the miner panel with the best identifier, not the preimage
Some checks failed
deploy / build (push) Waiting to run
deploy / deploy-api (push) Has been cancelled
deploy / deploy-web (push) Has been cancelled

The panel body listed the address and preimage, but its heading still read
`0x134e73f0…df59` — the one identifier a miner does not recognise, given top
billing. It now falls back through name, address, preimage, which is the order
a reader can actually use them in.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jp6a8EDar9ueEhAxzep4V5
This commit is contained in:
2026-09-09 15:15:12 +03:00
parent a3eb670d11
commit 18a99ddc8f

View File

@@ -56,7 +56,15 @@ export function MinerPanel({
<div>
<div className="eyebrow">Miner</div>
<h2 className="panel-title" style={{ marginTop: 4 }}>
{named ? row.display : shortMiner(miner)}
{/* The best identifier available, in the order a reader can use
them: an attributed node name, else the reward address the miner
configured, else the preimage the header carries. The full set
is below regardless. */}
{named
? row.display
: detail?.address
? `${detail.address.slice(0, 8)}${detail.address.slice(-4)}`
: shortMiner(miner)}
</h2>
{/* All three identifiers, because they answer different questions.
The node name is an inference and may be absent; the address is