diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index 8d44c2f904..296df43b3e 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -20,8 +20,8 @@ import { Routes } from '@shared/enums/routes.enum'; export class AppComponent extends StoreDispatcher implements OnInit { protected readonly menu$: Observable = this.select$(AppSelectors.menu); - protected readonly showLandingPage$: Observable = this.select$(getMergedRoute).pipe(filter(Boolean), map((route: MergedRoute) => route.url === '/')); - protected readonly showLoadingWebNodePage$: Observable = this.select$(getMergedRoute).pipe(filter(Boolean), map((route: MergedRoute) => route.url === `/${Routes.LOADING_WEB_NODE}`)); + protected readonly showLandingPage$: Observable = this.select$(getMergedRoute).pipe(filter(Boolean), map((route: MergedRoute) => route.url === '/' || route.url.startsWith('/?'))); + protected readonly showLoadingWebNodePage$: Observable = this.select$(getMergedRoute).pipe(filter(Boolean), map((route: MergedRoute) => route.url.startsWith(`/${Routes.LOADING_WEB_NODE}`))); subMenusLength: number = 0; hideToolbar: boolean = CONFIG.hideToolbar; loaded: boolean; diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index c04c0ff09e..df15f2ead3 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -44,8 +44,6 @@ export class AppGlobalErrorhandler implements ErrorHandler { constructor(private errorHandlerService: GlobalErrorHandlerService) {} handleError(error: any): void { - console.log(123123123); - Sentry.captureException(error); this.errorHandlerService.handleError(error); console.error(error); } @@ -90,9 +88,9 @@ export class AppGlobalErrorhandler implements ErrorHandler { ], providers: [ THEME_PROVIDER, - { provide: ErrorHandler, useClass: AppGlobalErrorhandler, deps: [GlobalErrorHandlerService] }, { provide: LOCALE_ID, useValue: 'en' }, { provide: ErrorHandler, useValue: Sentry.createErrorHandler() }, + { provide: ErrorHandler, useClass: AppGlobalErrorhandler, deps: [GlobalErrorHandlerService] }, { provide: Sentry.TraceService, deps: [Router] }, { provide: APP_INITIALIZER, diff --git a/frontend/src/app/core/services/web-node.service.ts b/frontend/src/app/core/services/web-node.service.ts index 8763276c60..295d373bff 100644 --- a/frontend/src/app/core/services/web-node.service.ts +++ b/frontend/src/app/core/services/web-node.service.ts @@ -91,7 +91,7 @@ export class WebNodeService { return from(wasm.run(this.webNodeKeyPair.privateKey)); }), tap((webnode: any) => { - (window as any)['webnode'] = webnode; + any(window)['webnode'] = webnode; this.webnode$.next(webnode); this.webnodeProgress$.next('Started'); }), @@ -108,14 +108,14 @@ export class WebNodeService { get status$(): Observable { return this.webnode$.asObservable().pipe( filter(Boolean), - switchMap(handle => from((handle as any).status())), + switchMap(handle => from(any(handle).status())), ); } get blockProducerStats$(): Observable { return this.webnode$.asObservable().pipe( filter(Boolean), - switchMap(handle => from((handle as any).stats().block_producer())), + switchMap(handle => from(any(handle).stats().block_producer())), ); } @@ -144,42 +144,42 @@ export class WebNodeService { get messageProgress$(): Observable { return this.webnode$.asObservable().pipe( filter(Boolean), - switchMap(handle => from((handle as any).state().message_progress())), + switchMap(handle => from(any(handle).state().message_progress())), ); } get sync$(): Observable { return this.webnode$.asObservable().pipe( filter(Boolean), - switchMap(handle => from((handle as any).stats().sync())), + switchMap(handle => from(any(handle).stats().sync())), ); } get accounts$(): Observable { return this.webnode$.asObservable().pipe( filter(Boolean), - switchMap(handle => from((handle as any).ledger().latest().accounts().all())), + switchMap(handle => from(any(handle).ledger().latest().accounts().all())), ); } get bestChainUserCommands$(): Observable { return this.webnode$.asObservable().pipe( filter(Boolean), - switchMap(handle => from((handle as any).transition_frontier().best_chain().user_commands())), + switchMap(handle => from(any(handle).transition_frontier().best_chain().user_commands())), ); } sendPayment$(payment: any): Observable { return this.webnode$.asObservable().pipe( filter(Boolean), - switchMap(handle => from((handle as any).transaction_pool().inject().payment(payment))), + switchMap(handle => from(any(handle).transaction_pool().inject().payment(payment))), ); } get transactionPool$(): Observable { return this.webnode$.asObservable().pipe( filter(Boolean), - switchMap(handle => from((handle as any).transaction_pool().get())), + switchMap(handle => from(any(handle).transaction_pool().get())), ); } } diff --git a/frontend/src/app/features/webnode/web-node-demo-dashboard/web-node-demo-dashboard.component.html b/frontend/src/app/features/webnode/web-node-demo-dashboard/web-node-demo-dashboard.component.html index 4bdfc683d5..17f3965093 100644 --- a/frontend/src/app/features/webnode/web-node-demo-dashboard/web-node-demo-dashboard.component.html +++ b/frontend/src/app/features/webnode/web-node-demo-dashboard/web-node-demo-dashboard.component.html @@ -1,7 +1,7 @@
-
+
@@ -32,7 +32,7 @@
@if (!loading[loading.length - 1].loaded && errors.length) { -
+
@@ -47,7 +47,7 @@
}
-