refactor(web): dependency management (#2386)
This commit is contained in:
@@ -24,6 +24,8 @@ import {
|
||||
export interface EncryptionProviderInterface {
|
||||
initialize(): Promise<void>
|
||||
|
||||
isPasscodeLocked(): Promise<boolean>
|
||||
|
||||
encryptSplitSingle(split: KeyedEncryptionSplit): Promise<EncryptedPayloadInterface>
|
||||
encryptSplit(split: KeyedEncryptionSplit): Promise<EncryptedPayloadInterface[]>
|
||||
decryptSplitSingle<
|
||||
|
||||
@@ -191,6 +191,7 @@ export class EncryptionService
|
||||
return ProtocolVersionLatest
|
||||
}
|
||||
|
||||
/** Unlike SessionManager.isSignedIn, hasAccount can be read before the application is unlocked and is based on the key state */
|
||||
public hasAccount() {
|
||||
return this.rootKeyManager.hasAccount()
|
||||
}
|
||||
@@ -625,7 +626,7 @@ export class EncryptionService
|
||||
/**
|
||||
* @returns True if the root key has not yet been unwrapped (passcode locked).
|
||||
*/
|
||||
public async isPasscodeLocked() {
|
||||
public async isPasscodeLocked(): Promise<boolean> {
|
||||
return (await this.rootKeyManager.hasRootKeyWrapper()) && this.rootKeyManager.getRootKey() == undefined
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user