Adding median fee to block.

This commit is contained in:
softsimon
2020-03-15 17:12:09 +07:00
parent 9b33baa4c1
commit dbf8d025e9
6 changed files with 14 additions and 12 deletions

View File

@@ -89,7 +89,7 @@ export class BlockComponent implements OnInit {
this.transactions = null;
this.electrsApiService.getBlockTransactions$(hash)
.subscribe((transactions: any) => {
if (!this.fees) {
if (this.fees === undefined) {
this.fees = transactions[0].vout.reduce((acc: number, curr: Vout) => acc + curr.value, 0) / 100000000 - this.blockSubsidy;
}
this.transactions = transactions;