mirror of
https://github.com/mempool/mempool.git
synced 2025-04-11 21:39:20 +02:00
Merge pull request #4658 from mempool/natsoni/fix-undefined-block-fee
Blockchain component: display dash when feerate is undefined
This commit is contained in:
commit
dcccc3c8a2
@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<ng-template #emptyfees>
|
||||
<div [attr.data-cy]="'bitcoin-block-offset=' + offset + '-index-' + i + '-fees'" class="fees">
|
||||
|
||||
<app-fee-rate unitClass=""></app-fee-rate>
|
||||
</div>
|
||||
</ng-template>
|
||||
<div [attr.data-cy]="'bitcoin-block-' + offset + '-index-' + i + '-fee-span'" class="fee-span"
|
||||
@ -37,7 +37,7 @@
|
||||
</div>
|
||||
<ng-template #emptyfeespan>
|
||||
<div [attr.data-cy]="'bitcoin-block-offset=' + offset + '-index-' + i + '-fees'" class="fee-span">
|
||||
|
||||
<app-fee-rate unitClass=""></app-fee-rate>
|
||||
</div>
|
||||
</ng-template>
|
||||
<div [attr.data-cy]="'bitcoin-block-' + offset + '-index-' + i + '-total-fees'" *ngIf="showMiningInfo"
|
||||
|
@ -1,4 +1,10 @@
|
||||
<ng-container *ngIf="rateUnits$ | async as units">
|
||||
<ng-container *ngIf="units !== 'wu'">{{ fee / (weight / 4) | feeRounding:rounding }} <span *ngIf="showUnit" [class]="unitClass" [style]="unitStyle" i18n="shared.sat-vbyte|sat/vB">sat/vB</span></ng-container>
|
||||
<ng-container *ngIf="units === 'wu'">{{ fee / weight | feeRounding:rounding }} <span *ngIf="showUnit" [class]="unitClass" [style]="unitStyle" i18n="shared.sat-weight-units|sat/WU">sat/WU</span></ng-container>
|
||||
<ng-container *ngIf="fee !== undefined; else noFee">
|
||||
<ng-container *ngIf="units !== 'wu'">{{ fee / (weight / 4) | feeRounding:rounding }} <span *ngIf="showUnit" [class]="unitClass" [style]="unitStyle" i18n="shared.sat-vbyte|sat/vB">sat/vB</span></ng-container>
|
||||
<ng-container *ngIf="units === 'wu'">{{ fee / weight | feeRounding:rounding }} <span *ngIf="showUnit" [class]="unitClass" [style]="unitStyle" i18n="shared.sat-weight-units|sat/WU">sat/WU</span></ng-container>
|
||||
</ng-container>
|
||||
<ng-template #noFee>
|
||||
<ng-container *ngIf="units !== 'wu'">- <span *ngIf="showUnit" [class]="unitClass" [style]="unitStyle" i18n="shared.sat-vbyte|sat/vB">sat/vB</span></ng-container>
|
||||
<ng-container *ngIf="units === 'wu'">- <span *ngIf="showUnit" [class]="unitClass" [style]="unitStyle" i18n="shared.sat-weight-units|sat/WU">sat/WU</span></ng-container>
|
||||
</ng-template>
|
||||
</ng-container>
|
@ -8,7 +8,7 @@ import { StateService } from '../../../services/state.service';
|
||||
styleUrls: ['./fee-rate.component.scss']
|
||||
})
|
||||
export class FeeRateComponent implements OnInit {
|
||||
@Input() fee: number;
|
||||
@Input() fee: number | undefined;
|
||||
@Input() weight: number = 4;
|
||||
@Input() rounding: string = null;
|
||||
@Input() showUnit: boolean = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user