Subscribe to websocket blocks update for all graphs components

This commit is contained in:
nymkappa 2022-04-01 00:25:46 +09:00
parent 08accbca5d
commit 52735553dd
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04

View File

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