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('')}