Merge pull request #1493 from mempool/nymkappa/bugfix/websocket-graphs

Subscribe to websocket blocks update for all graphs components
This commit is contained in:
softsimon 2022-03-31 19:36:26 +04:00 committed by GitHub
commit 94e0416951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { StateService } from "src/app/services/state.service"; import { StateService } from "src/app/services/state.service";
import { WebsocketService } from "src/app/services/websocket.service";
@Component({ @Component({
selector: 'app-graphs', selector: 'app-graphs',
@ -7,9 +8,12 @@ import { StateService } from "src/app/services/state.service";
styleUrls: ['./graphs.component.scss'], styleUrls: ['./graphs.component.scss'],
}) })
export class GraphsComponent implements OnInit { export class GraphsComponent implements OnInit {
constructor(public stateService: StateService) { } constructor(
public stateService: StateService,
private websocketService: WebsocketService
) { }
ngOnInit(): void { ngOnInit(): void {
this.websocketService.want(['blocks']);
} }
} }