From 5552e67127a17a89b9d3eb685840c4e827882291 Mon Sep 17 00:00:00 2001 From: Gr1ll Date: Sun, 11 Aug 2024 17:13:24 +0530 Subject: [PATCH] fix: auth check when at homepage --- apps/frontend/src/app/core/auth.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/frontend/src/app/core/auth.service.ts b/apps/frontend/src/app/core/auth.service.ts index 43b7fc7..1223ce2 100644 --- a/apps/frontend/src/app/core/auth.service.ts +++ b/apps/frontend/src/app/core/auth.service.ts @@ -19,6 +19,9 @@ export class AuthService { private router: Router, ) { this.initializeKeypair() + this.isLoggedIn().then((isLoggedIn: boolean) => + this.loginStatusChanged.emit(isLoggedIn), + ) } generateKeypair(): Keypair { @@ -89,7 +92,6 @@ export class AuthService { if (keypair) { return await this.isAccountExist(keypair.publicKey()) } - this.loginStatusChanged.emit(false) return false }