mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-01 04:37:40 +02:00
[PM-6241] Remove unused entityId and entityType state (#7899)
* Removed unused entityId and entityType state * Removed from interface. * Removed unused state from AccountProfile.
This commit is contained in:
parent
6562875a23
commit
7c37ce117c
@ -343,10 +343,6 @@ export abstract class StateService<T extends Account = Account> {
|
|||||||
* @deprecated Do not call this directly, use SendService
|
* @deprecated Do not call this directly, use SendService
|
||||||
*/
|
*/
|
||||||
setEncryptedSends: (value: { [id: string]: SendData }, options?: StorageOptions) => Promise<void>;
|
setEncryptedSends: (value: { [id: string]: SendData }, options?: StorageOptions) => Promise<void>;
|
||||||
getEntityId: (options?: StorageOptions) => Promise<string>;
|
|
||||||
setEntityId: (value: string, options?: StorageOptions) => Promise<void>;
|
|
||||||
getEntityType: (options?: StorageOptions) => Promise<any>;
|
|
||||||
setEntityType: (value: string, options?: StorageOptions) => Promise<void>;
|
|
||||||
getEquivalentDomains: (options?: StorageOptions) => Promise<string[][]>;
|
getEquivalentDomains: (options?: StorageOptions) => Promise<string[][]>;
|
||||||
setEquivalentDomains: (value: string, options?: StorageOptions) => Promise<void>;
|
setEquivalentDomains: (value: string, options?: StorageOptions) => Promise<void>;
|
||||||
getEventCollection: (options?: StorageOptions) => Promise<EventData[]>;
|
getEventCollection: (options?: StorageOptions) => Promise<EventData[]>;
|
||||||
|
@ -181,8 +181,6 @@ export class AccountProfile {
|
|||||||
name?: string;
|
name?: string;
|
||||||
email?: string;
|
email?: string;
|
||||||
emailVerified?: boolean;
|
emailVerified?: boolean;
|
||||||
entityId?: string;
|
|
||||||
entityType?: string;
|
|
||||||
everBeenUnlocked?: boolean;
|
everBeenUnlocked?: boolean;
|
||||||
forceSetPasswordReason?: ForceSetPasswordReason;
|
forceSetPasswordReason?: ForceSetPasswordReason;
|
||||||
hasPremiumPersonally?: boolean;
|
hasPremiumPersonally?: boolean;
|
||||||
|
@ -1713,40 +1713,6 @@ export class StateService<
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getEntityId(options?: StorageOptions): Promise<string> {
|
|
||||||
return (
|
|
||||||
await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()))
|
|
||||||
)?.profile?.entityId;
|
|
||||||
}
|
|
||||||
|
|
||||||
async setEntityId(value: string, options?: StorageOptions): Promise<void> {
|
|
||||||
const account = await this.getAccount(
|
|
||||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()),
|
|
||||||
);
|
|
||||||
account.profile.entityId = value;
|
|
||||||
await this.saveAccount(
|
|
||||||
account,
|
|
||||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getEntityType(options?: StorageOptions): Promise<any> {
|
|
||||||
return (
|
|
||||||
await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()))
|
|
||||||
)?.profile?.entityType;
|
|
||||||
}
|
|
||||||
|
|
||||||
async setEntityType(value: string, options?: StorageOptions): Promise<void> {
|
|
||||||
const account = await this.getAccount(
|
|
||||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()),
|
|
||||||
);
|
|
||||||
account.profile.entityType = value;
|
|
||||||
await this.saveAccount(
|
|
||||||
account,
|
|
||||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getEquivalentDomains(options?: StorageOptions): Promise<string[][]> {
|
async getEquivalentDomains(options?: StorageOptions): Promise<string[][]> {
|
||||||
return (
|
return (
|
||||||
await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()))
|
await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()))
|
||||||
|
Loading…
Reference in New Issue
Block a user