mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-25 16:59:17 +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 }> {
|
||||
return (await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))
|
||||
?.data?.providers;
|
||||
return (
|
||||
await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()))
|
||||
)?.data?.providers;
|
||||
}
|
||||
|
||||
async setProviders(
|
||||
@ -1855,10 +1856,13 @@ export class StateService<
|
||||
options?: StorageOptions
|
||||
): Promise<void> {
|
||||
const account = await this.getAccount(
|
||||
this.reconcileOptions(options, this.defaultInMemoryOptions)
|
||||
this.reconcileOptions(options, await this.defaultOnDiskOptions())
|
||||
);
|
||||
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> {
|
||||
|
Loading…
Reference in New Issue
Block a user