mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 02:03:39 +00:00
[PM-5276] Migrate FolderService to state providers (#7682)
* added state definitionand key definition for folder service * added data migrations * created folder to house key definitions * deleted browser-folder-service and added state provider to the browser * exposed decrypt function so it can be used by the key definition, updated folder service to use state provider * removed memory since derived state is now used * updated test cases * updated test cases * updated migrations after merge conflict fix * added state provider to the folder service constructor * renamed migration file * updated comments * updated comments * removed service registartion from browser service module and removed unused set and get encrypted folders from state service * renamed files * added storage location overides and removed extra methods
This commit is contained in:
@@ -19,7 +19,6 @@ import { StateService as BaseStateService } from "@bitwarden/common/platform/ser
|
||||
import { SendData } from "@bitwarden/common/tools/send/models/data/send.data";
|
||||
import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data";
|
||||
import { CollectionData } from "@bitwarden/common/vault/models/data/collection.data";
|
||||
import { FolderData } from "@bitwarden/common/vault/models/data/folder.data";
|
||||
|
||||
import { Account } from "./account";
|
||||
import { GlobalState } from "./global-state";
|
||||
@@ -82,19 +81,6 @@ export class StateService extends BaseStateService<GlobalState, Account> {
|
||||
return await super.setEncryptedCollections(value, options);
|
||||
}
|
||||
|
||||
async getEncryptedFolders(options?: StorageOptions): Promise<{ [id: string]: FolderData }> {
|
||||
options = this.reconcileOptions(options, await this.defaultInMemoryOptions());
|
||||
return await super.getEncryptedFolders(options);
|
||||
}
|
||||
|
||||
async setEncryptedFolders(
|
||||
value: { [id: string]: FolderData },
|
||||
options?: StorageOptions,
|
||||
): Promise<void> {
|
||||
options = this.reconcileOptions(options, await this.defaultInMemoryOptions());
|
||||
return await super.setEncryptedFolders(value, options);
|
||||
}
|
||||
|
||||
async getEncryptedSends(options?: StorageOptions): Promise<{ [id: string]: SendData }> {
|
||||
options = this.reconcileOptions(options, await this.defaultInMemoryOptions());
|
||||
return await super.getEncryptedSends(options);
|
||||
|
||||
Reference in New Issue
Block a user