mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 14:50:52 +01:00
Subscribe to websocket blocks update for all graphs components
This commit is contained in:
parent
08accbca5d
commit
52735553dd
1 changed files with 6 additions and 2 deletions
|
@ -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']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue