Use block.extras on bitcoin network for fees/subsidy

This commit is contained in:
nymkappa
2022-04-20 13:30:06 +09:00
parent 178cb72004
commit 771ab36694
2 changed files with 17 additions and 9 deletions

View File

@@ -206,13 +206,10 @@ export class BlockComponent implements OnInit, OnDestroy {
this.queryParamsSubscription.unsubscribe();
}
// TODO - Refactor this.fees/this.reward for liquid because it is not
// used anymore on Bitcoin networks (we use block.extras directly)
setBlockSubsidy() {
if (this.network === 'liquid' || this.network === 'liquidtestnet') {
this.blockSubsidy = 0;
return;
}
const halvings = Math.floor(this.block.height / 210000);
this.blockSubsidy = 50 * 2 ** -halvings;
this.blockSubsidy = 0;
}
pageChange(page: number, target: HTMLElement) {