From 01f474628a19f9c24c237b5380e4e49383db49da Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Tue, 12 Apr 2022 18:06:32 -0400 Subject: [PATCH] Add websocket service to avoid issues with blocks --- frontend/src/app/components/docs/docs.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/components/docs/docs.component.ts b/frontend/src/app/components/docs/docs.component.ts index 3b18c1891..2d0d0b55a 100644 --- a/frontend/src/app/components/docs/docs.component.ts +++ b/frontend/src/app/components/docs/docs.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit, HostBinding } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Env, StateService } from 'src/app/services/state.service'; +import { WebsocketService } from 'src/app/services/websocket.service'; @Component({ selector: 'app-docs', @@ -19,9 +20,11 @@ export class DocsComponent implements OnInit { constructor( private route: ActivatedRoute, private stateService: StateService, + private websocket: WebsocketService, ) { } ngOnInit(): void { + this.websocket.want(['blocks']); const url = this.route.snapshot.url; if( url[1].path === "faq" ) { this.activeTab = 0; @@ -34,7 +37,7 @@ export class DocsComponent implements OnInit { this.env = this.stateService.env; this.showWebSocketTab = ( ! ( ( this.stateService.network === "bisq" ) || ( this.stateService.network === "liquidtestnet" ) ) ); this.showFaqTab = ( this.env.BASE_MODULE === 'mempool' ) ? true : false; - + document.querySelector( "html" ).style.scrollBehavior = "smooth"; }