Removing halving event code.

This commit is contained in:
softsimon
2020-05-12 14:49:29 +07:00
parent 0dc22b53ad
commit e565815dfd
9 changed files with 3 additions and 190 deletions

View File

@@ -1,6 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { WebsocketService } from 'src/app/services/websocket.service';
import { StateService } from 'src/app/services/state.service';
@Component({
selector: 'app-start',
@@ -10,24 +9,11 @@ import { StateService } from 'src/app/services/state.service';
export class StartComponent implements OnInit {
view: 'blocks' | 'transactions' = 'blocks';
isHalveningeEvent = false;
constructor(
private websocketService: WebsocketService,
private stateService: StateService,
) { }
ngOnInit() {
this.websocketService.want(['blocks', 'stats', 'mempool-blocks']);
this.stateService.blocks$
.subscribe((block) => {
if (block.height % 210000 === 0) {
this.isHalveningeEvent = true;
setTimeout(() => {
this.isHalveningeEvent = false;
}, 60 * 60 * 1000);
}
});
}
}