Various bugfixes and removing unfairly cheap joke.

This commit is contained in:
softsimon 2020-03-28 16:38:28 +07:00
parent 3f35671fb5
commit 2f83da7ce9
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
5 changed files with 4 additions and 7 deletions

View File

@ -40,7 +40,7 @@
<tbody>
<tr>
<td class="td-width">Hash</td>
<td><a [routerLink]="['/block/', block.id]" title="{{ block.id }}">{{ block.id | shortenString : 13 }}</a> <app-clipboard [text]="block.id"></app-clipboard></td>
<td><a [routerLink]="['/block/', block.id]" title="{{ block.id }}">{{ block.id | shortenString : 13 }}</a> <app-clipboard class="d-none d-sm-inline-block" [text]="block.id"></app-clipboard></td>
</tr>
<tr *ngIf="block.medianFee !== undefined">
<td>Median fee</td>

View File

@ -11,6 +11,6 @@
@media (max-width: 767.98px) {
.td-width {
width: 150px;
width: 140px;
}
}

View File

@ -58,7 +58,7 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
@HostListener('window:resize', ['$event'])
onResize() {
if (this.mempoolBlocks.length) {
if (this.mempoolBlocks && this.mempoolBlocks.length) {
this.mempoolBlocks = this.reduceMempoolBlocksToFitScreen(JSON.parse(JSON.stringify(this.mempoolBlocksFull)));
}
}

View File

@ -59,7 +59,6 @@
<td>
{{ tx.fee / (tx.weight / 4) | number : '1.1-1' }} sats/vB
&nbsp;
<span *ngIf="feeRating === 0" class="badge badge-success">Unfairly cheap</span>
<span *ngIf="feeRating === 1" class="badge badge-success">Optimal</span>
<span *ngIf="feeRating === 2" class="badge badge-warning" title="Only ~{{ medianFeeNeeded }} sat/vB was needed to get into this block">Overpaid {{ overpaidTimes }}x</span>
<span *ngIf="feeRating === 3" class="badge badge-danger" title="Only ~{{ medianFeeNeeded }} sat/vB was needed to get into this block">Overpaid {{ overpaidTimes }}x</span>

View File

@ -148,9 +148,7 @@ export class TransactionComponent implements OnInit, OnDestroy {
this.overpaidTimes = Math.round(feePervByte / this.medianFeeNeeded);
if (feePervByte < 0.9) {
this.feeRating = 0;
} else if (feePervByte <= this.medianFeeNeeded || this.overpaidTimes < 2) {
if (feePervByte <= this.medianFeeNeeded || this.overpaidTimes < 2) {
this.feeRating = 1;
} else {
this.feeRating = 2;