diff --git a/jslib b/jslib index 76c53bc641..0bdbfd7984 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 76c53bc641bc2385b601921f52be105bb539ffe6 +Subproject commit 0bdbfd79846e54e1b28a7fd116d8ffa533de4219 diff --git a/src/app/services/unauth-guard.service.ts b/src/app/services/unauth-guard.service.ts index 3b86cd6042..c196232f3a 100644 --- a/src/app/services/unauth-guard.service.ts +++ b/src/app/services/unauth-guard.service.ts @@ -4,19 +4,19 @@ import { Router, } from '@angular/router'; -import { CryptoService } from 'jslib/abstractions/crypto.service'; +import { LockService } from 'jslib/abstractions/lock.service'; import { UserService } from 'jslib/abstractions/user.service'; @Injectable() export class UnauthGuardService implements CanActivate { - constructor(private cryptoService: CryptoService, private userService: UserService, + constructor(private lockService: LockService, private userService: UserService, private router: Router) { } async canActivate() { const isAuthed = await this.userService.isAuthenticated(); if (isAuthed) { - const hasKey = await this.cryptoService.hasKey(); - if (!hasKey) { + const locked = await this.lockService.isLocked(); + if (locked) { this.router.navigate(['lock']); } else { this.router.navigate(['vault']);