diff --git a/src/abstractions/lock.service.ts b/src/abstractions/lock.service.ts index 0b025b7039..448a0a05b0 100644 --- a/src/abstractions/lock.service.ts +++ b/src/abstractions/lock.service.ts @@ -1,4 +1,5 @@ export abstract class LockService { checkLock: () => Promise; lock: () => Promise; + setLockOption: (lockOption: number) => Promise; } diff --git a/src/services/lock.service.ts b/src/services/lock.service.ts index 60d2a98be4..ba54fec1bf 100644 --- a/src/services/lock.service.ts +++ b/src/services/lock.service.ts @@ -61,4 +61,9 @@ export class LockService implements LockServiceAbstraction { this.collectionService.clearCache(); this.messagingService.send('locked'); } + + async setLockOption(lockOption: number): Promise { + await this.storageService.save(ConstantsService.lockOptionKey, lockOption); + await this.cryptoService.toggleKey(); + } }