diff --git a/src/program.ts b/src/program.ts index 3ff128ef5c8..6ac57045667 100644 --- a/src/program.ts +++ b/src/program.ts @@ -565,8 +565,8 @@ export class Program { private async exitIfLocked() { await this.exitIfNotAuthed(); - const key = await this.main.cryptoService.getKey(); - if (key == null) { + const hasKey = await this.main.cryptoService.hasKey(); + if (!hasKey) { this.processResponse(Response.error('Vault is locked.')); } }