mirror of
https://github.com/mempool/mempool.git
synced 2025-04-08 11:58:31 +02:00
parent
38d424f793
commit
fc7a5c2e28
@ -1,3 +1,8 @@
|
||||
|
||||
<div class="text-center pb-1" *ngIf="network === '' && latestBlockHeight && latestBlockHeight < 630000">
|
||||
<h3>Quantitative Hardening in {{ 630000 - latestBlockHeight }} blocks (~<app-timespan [time]="(630000 - latestBlockHeight) * 10 * 60"></app-timespan>)</h3>
|
||||
</div>
|
||||
|
||||
<div class="container-xl">
|
||||
|
||||
<hr>
|
||||
|
@ -4,6 +4,7 @@ import { StateService } from '../../services/state.service';
|
||||
import { Block } from '../../interfaces/electrs.interface';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { SeoService } from 'src/app/services/seo.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'app-latest-blocks',
|
||||
@ -11,11 +12,15 @@ import { SeoService } from 'src/app/services/seo.service';
|
||||
styleUrls: ['./latest-blocks.component.scss'],
|
||||
})
|
||||
export class LatestBlocksComponent implements OnInit, OnDestroy {
|
||||
network = environment.network;
|
||||
|
||||
blocks: any[] = [];
|
||||
blockSubscription: Subscription;
|
||||
isLoading = true;
|
||||
interval: any;
|
||||
|
||||
latestBlockHeight: number;
|
||||
|
||||
heightOfPageUntilBlocks = 430;
|
||||
heightOfBlocksTableChunk = 470;
|
||||
|
||||
@ -34,6 +39,8 @@ export class LatestBlocksComponent implements OnInit, OnDestroy {
|
||||
return;
|
||||
}
|
||||
|
||||
this.latestBlockHeight = block.height;
|
||||
|
||||
if (block.height === this.blocks[0].height) {
|
||||
return;
|
||||
}
|
||||
@ -66,6 +73,8 @@ export class LatestBlocksComponent implements OnInit, OnDestroy {
|
||||
this.blocks = blocks;
|
||||
this.isLoading = false;
|
||||
|
||||
this.latestBlockHeight = blocks[0].height;
|
||||
|
||||
const spaceForBlocks = window.innerHeight - this.heightOfPageUntilBlocks;
|
||||
const chunks = Math.ceil(spaceForBlocks / this.heightOfBlocksTableChunk) - 1;
|
||||
if (chunks > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user