mirror of
https://github.com/mempool/mempool.git
synced 2025-03-15 04:11:48 +01:00
Support Liquid 0.1 sat/vB fees on blocks.
This commit is contained in:
parent
0f390e65a4
commit
c6b1979391
4 changed files with 12 additions and 4 deletions
|
@ -7,10 +7,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="block-body">
|
<div class="block-body">
|
||||||
<div class="fees">
|
<div class="fees">
|
||||||
~{{ block.medianFee | number:'1.0-0' }} <ng-container i18n="shared.sat-vbyte|sat/vB">sat/vB</ng-container>
|
~{{ block.medianFee | number:feeRounding }} <ng-container i18n="shared.sat-vbyte|sat/vB">sat/vB</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<div class="fee-span">
|
<div class="fee-span">
|
||||||
{{ block.feeRange[1] | number:'1.0-0' }} - {{ block.feeRange[block.feeRange.length - 1] | number:'1.0-0' }} <ng-container i18n="shared.sat-vbyte|sat/vB">sat/vB</ng-container>
|
{{ block.feeRange[1] | number:feeRounding }} - {{ block.feeRange[block.feeRange.length - 1] | number:feeRounding }} <ng-container i18n="shared.sat-vbyte|sat/vB">sat/vB</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<div class="block-size" [innerHTML]="block.size | bytes: 2">‎</div>
|
<div class="block-size" [innerHTML]="block.size | bytes: 2">‎</div>
|
||||||
<div class="transaction-count">
|
<div class="transaction-count">
|
||||||
|
|
|
@ -23,6 +23,7 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
|
||||||
interval: any;
|
interval: any;
|
||||||
tabHidden = false;
|
tabHidden = false;
|
||||||
loadingBlocks = false;
|
loadingBlocks = false;
|
||||||
|
feeRounding = '1.0-0';
|
||||||
|
|
||||||
arrowVisible = false;
|
arrowVisible = false;
|
||||||
arrowLeftPx = 30;
|
arrowLeftPx = 30;
|
||||||
|
@ -44,6 +45,9 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
if (this.stateService.network === 'liquid') {
|
||||||
|
this.feeRounding = '1.0-1';
|
||||||
|
}
|
||||||
this.blocks.forEach((b) => this.blockStyles.push(this.getStyleForBlock(b)));
|
this.blocks.forEach((b) => this.blockStyles.push(this.getStyleForBlock(b)));
|
||||||
this.networkSubscriotion = this.stateService.networkChanged$.subscribe((network) => this.network = network);
|
this.networkSubscriotion = this.stateService.networkChanged$.subscribe((network) => this.network = network);
|
||||||
this.tabHiddenSubscription = this.stateService.isTabHidden$.subscribe((tabHidden) => this.tabHidden = tabHidden);
|
this.tabHiddenSubscription = this.stateService.isTabHidden$.subscribe((tabHidden) => this.tabHidden = tabHidden);
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
<a [routerLink]="['/mempool-block/' | relativeUrl, i]" class="blockLink"> </a>
|
<a [routerLink]="['/mempool-block/' | relativeUrl, i]" class="blockLink"> </a>
|
||||||
<div class="block-body">
|
<div class="block-body">
|
||||||
<div class="fees">
|
<div class="fees">
|
||||||
~{{ projectedBlock.medianFee | number:'1.0-0' }} <span i18n="shared.sat-vbyte|sat/vB">sat/vB</span>
|
~{{ projectedBlock.medianFee | number:feeRounding }} <span i18n="shared.sat-vbyte|sat/vB">sat/vB</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="fee-span">
|
<div class="fee-span">
|
||||||
{{ projectedBlock.feeRange[0] | number:'1.0-0' }} - {{ projectedBlock.feeRange[projectedBlock.feeRange.length - 1] | number:'1.0-0' }} <span i18n="shared.sat-vbyte|sat/vB">sat/vB</span>
|
{{ projectedBlock.feeRange[0] | number:feeRounding }} - {{ projectedBlock.feeRange[projectedBlock.feeRange.length - 1] | number:feeRounding }} <span i18n="shared.sat-vbyte|sat/vB">sat/vB</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="block-size" [innerHTML]="projectedBlock.blockSize | bytes: 2">‎</div>
|
<div class="block-size" [innerHTML]="projectedBlock.blockSize | bytes: 2">‎</div>
|
||||||
<div class="transaction-count">
|
<div class="transaction-count">
|
||||||
|
|
|
@ -31,6 +31,7 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
|
||||||
arrowVisible = false;
|
arrowVisible = false;
|
||||||
tabHidden = false;
|
tabHidden = false;
|
||||||
loadingMempoolBlocks = true;
|
loadingMempoolBlocks = true;
|
||||||
|
feeRounding = '1.0-0';
|
||||||
|
|
||||||
rightPosition = 0;
|
rightPosition = 0;
|
||||||
transition = '2s';
|
transition = '2s';
|
||||||
|
@ -49,6 +50,9 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
if (this.stateService.network === 'liquid') {
|
||||||
|
this.feeRounding = '1.0-1';
|
||||||
|
}
|
||||||
this.mempoolBlocks.map(() => {
|
this.mempoolBlocks.map(() => {
|
||||||
this.updateMempoolBlockStyles();
|
this.updateMempoolBlockStyles();
|
||||||
this.calculateTransactionPosition();
|
this.calculateTransactionPosition();
|
||||||
|
|
Loading…
Add table
Reference in a new issue