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 @@ Miner - + diff --git a/frontend/src/app/interfaces/electrs.interface.ts b/frontend/src/app/interfaces/electrs.interface.ts index cff0483e0..f939ce091 100644 --- a/frontend/src/app/interfaces/electrs.interface.ts +++ b/frontend/src/app/interfaces/electrs.interface.ts @@ -92,6 +92,7 @@ export interface Block { medianFee?: number; feeRange?: number[]; reward?: number; + coinbaseTx?: Transaction; } export interface Address { diff --git a/frontend/src/app/pipes/miner/miner.component.ts b/frontend/src/app/pipes/miner/miner.component.ts index 6e33c5f9c..693812efe 100644 --- a/frontend/src/app/pipes/miner/miner.component.ts +++ b/frontend/src/app/pipes/miner/miner.component.ts @@ -19,6 +19,7 @@ export class MinerComponent implements OnChanges { ) { } ngOnChanges() { + this.miner = ''; this.loading = true; this.findMinerFromCoinbase(); }