mirror of
https://github.com/mempool/mempool.git
synced 2024-12-28 17:24:25 +01:00
Merge pull request #1363 from mempool/simon/double-websocket-fix
Remove duplicate websocket push.
This commit is contained in:
commit
46b0a8da8f
@ -1,5 +1,4 @@
|
|||||||
import { Component, ElementRef, HostListener, OnInit, ViewChild } from '@angular/core';
|
import { Component, ElementRef, HostListener, OnInit, ViewChild } from '@angular/core';
|
||||||
import { WebsocketService } from 'src/app/services/websocket.service';
|
|
||||||
import { StateService } from 'src/app/services/state.service';
|
import { StateService } from 'src/app/services/state.service';
|
||||||
import { specialBlocks } from 'src/app/app.constants';
|
import { specialBlocks } from 'src/app/app.constants';
|
||||||
|
|
||||||
@ -20,12 +19,10 @@ export class StartComponent implements OnInit {
|
|||||||
@ViewChild('blockchainContainer') blockchainContainer: ElementRef;
|
@ViewChild('blockchainContainer') blockchainContainer: ElementRef;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private websocketService: WebsocketService,
|
|
||||||
private stateService: StateService,
|
private stateService: StateService,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.websocketService.want(['blocks', 'stats', 'mempool-blocks']);
|
|
||||||
this.stateService.blocks$
|
this.stateService.blocks$
|
||||||
.subscribe((blocks: any) => {
|
.subscribe((blocks: any) => {
|
||||||
if (this.stateService.network !== '') {
|
if (this.stateService.network !== '') {
|
||||||
|
Loading…
Reference in New Issue
Block a user