From 2d3ccdaebb03f79f549351de2702ca144956c581 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 20 Nov 2025 17:16:01 +1100 Subject: [PATCH] fix: Coinbase txs --- templates/index.html | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/templates/index.html b/templates/index.html index 59e7afd..12e6772 100644 --- a/templates/index.html +++ b/templates/index.html @@ -548,16 +548,32 @@

Inputs (${tx.inputs.length})

- ${tx.inputs.map((input, i) => ` -
-
- #${i} - ${formatValue(input.coin.value)} -
-
${input.coin.address}
- ${input.coin.covenant.action !== 'NONE' ? `
Covenant: ${input.coin.covenant.action}
` : ''} -
- `).join('')} + ${tx.inputs.map((input, i) => { + // Check if this is a coinbase input + const isCoinbase = input.prevout && input.prevout.hash === '0000000000000000000000000000000000000000000000000000000000000000'; + + if (isCoinbase) { + return ` +
+
+ #${i} + COINBASE +
+
+ `; + } else { + return ` +
+
+ #${i} + ${input.coin ? formatValue(input.coin.value) : 'Unknown'} +
+
${input.coin ? input.coin.address : (input.address || 'Unknown')}
+ ${input.coin && input.coin.covenant.action !== 'NONE' ? `
Covenant: ${input.coin.covenant.action}
` : ''} +
+ `; + } + }).join('')}