mirror of
https://github.com/bitwarden/browser
synced 2024-12-29 11:22:30 +01:00
Move providers to profile and save to disk (#662)
* Move providers to profile and save to disk * Move providers back to AccountData
This commit is contained in:
parent
b7bb16c18a
commit
47399bb583
@ -1846,8 +1846,9 @@ export class StateService<
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getProviders(options?: StorageOptions): Promise<{ [id: string]: ProviderData }> {
|
async getProviders(options?: StorageOptions): Promise<{ [id: string]: ProviderData }> {
|
||||||
return (await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))
|
return (
|
||||||
?.data?.providers;
|
await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()))
|
||||||
|
)?.data?.providers;
|
||||||
}
|
}
|
||||||
|
|
||||||
async setProviders(
|
async setProviders(
|
||||||
@ -1855,10 +1856,13 @@ export class StateService<
|
|||||||
options?: StorageOptions
|
options?: StorageOptions
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const account = await this.getAccount(
|
const account = await this.getAccount(
|
||||||
this.reconcileOptions(options, this.defaultInMemoryOptions)
|
this.reconcileOptions(options, await this.defaultOnDiskOptions())
|
||||||
);
|
);
|
||||||
account.data.providers = value;
|
account.data.providers = value;
|
||||||
await this.saveAccount(account, this.reconcileOptions(options, this.defaultInMemoryOptions));
|
await this.saveAccount(
|
||||||
|
account,
|
||||||
|
this.reconcileOptions(options, await this.defaultOnDiskOptions())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getPublicKey(options?: StorageOptions): Promise<ArrayBuffer> {
|
async getPublicKey(options?: StorageOptions): Promise<ArrayBuffer> {
|
||||||
|
Loading…
Reference in New Issue
Block a user