diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index a19d10a01..20eb6b607 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -98,7 +98,7 @@ class Blocks { vin: [{ scriptsig: tx.vin[0].scriptsig }], - vout: tx.vout.map((vout) => ({ scriptpubkey_address: vout.scriptpubkey_address })) + vout: tx.vout.map((vout) => ({ scriptpubkey_address: vout.scriptpubkey_address, value: vout.value })) }; } } diff --git a/backend/src/interfaces.ts b/backend/src/interfaces.ts index c467bce1c..49ab65f65 100644 --- a/backend/src/interfaces.ts +++ b/backend/src/interfaces.ts @@ -43,6 +43,7 @@ interface VinStrippedToScriptsig { interface VoutStrippedToScriptPubkey { scriptpubkey_address: string | undefined; + value: number; } export interface TransactionExtended extends Transaction { diff --git a/frontend/src/app/components/block/block.component.html b/frontend/src/app/components/block/block.component.html index 4757afc95..e1e088b2c 100644 --- a/frontend/src/app/components/block/block.component.html +++ b/frontend/src/app/components/block/block.component.html @@ -47,7 +47,7 @@ Total fees () - + Subsidy + fees: () diff --git a/frontend/src/app/components/block/block.component.ts b/frontend/src/app/components/block/block.component.ts index e0a020018..60624e250 100644 --- a/frontend/src/app/components/block/block.component.ts +++ b/frontend/src/app/components/block/block.component.ts @@ -108,7 +108,7 @@ export class BlockComponent implements OnInit, OnDestroy { ), ) .subscribe((transactions: Transaction[]) => { - if (this.fees === undefined && transactions[0] && this.network !== 'liquid') { + if (this.fees === undefined && transactions[0]) { this.fees = transactions[0].vout.reduce((acc: number, curr: Vout) => acc + curr.value, 0) / 100000000 - this.blockSubsidy; } this.transactions = transactions;