diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index f93c89c77..fbbe48061 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -75,6 +75,7 @@ class Blocks { transactions.sort((a, b) => b.feePerVsize - a.feePerVsize); block.medianFee = transactions.length > 1 ? this.median(transactions.map((tx) => tx.feePerVsize)) : 0; block.feeRange = transactions.length > 1 ? this.getFeesInRange(transactions, 8) : [0, 0]; + block.coinbaseTx = transactions[0]; this.blocks.push(block); if (this.blocks.length > config.KEEP_BLOCK_AMOUNT) { diff --git a/backend/src/interfaces.ts b/backend/src/interfaces.ts index c8b7cdd0c..85c56afd1 100644 --- a/backend/src/interfaces.ts +++ b/backend/src/interfaces.ts @@ -105,6 +105,7 @@ export interface Block { medianFee?: number; feeRange?: number[]; reward?: number; + coinbaseTx?: Transaction; } export interface Address { diff --git a/frontend/src/app/components/block/block.component.html b/frontend/src/app/components/block/block.component.html index 41c8cfd74..414ab16dc 100644 --- a/frontend/src/app/components/block/block.component.html +++ b/frontend/src/app/components/block/block.component.html @@ -70,7 +70,7 @@