mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
Run addAccount storage scaffolding calls through saveAccount (#675)
This commit is contained in:
parent
e3b29a40d3
commit
cdc6cbaeb3
@ -2246,11 +2246,7 @@ export class StateService<
|
||||
account.profile.apiKeyClientId = null;
|
||||
account.keys.apiKeyClientSecret = null;
|
||||
}
|
||||
await this.storageService.save(
|
||||
account.profile.userId,
|
||||
account,
|
||||
await this.defaultOnDiskLocalOptions()
|
||||
);
|
||||
await this.saveAccount(account, await this.defaultOnDiskLocalOptions());
|
||||
}
|
||||
|
||||
protected async scaffoldNewAccountMemoryStorage(account: TAccount): Promise<void> {
|
||||
@ -2262,11 +2258,7 @@ export class StateService<
|
||||
storedAccount.settings.environmentUrls = account.settings.environmentUrls;
|
||||
account.settings = storedAccount.settings;
|
||||
}
|
||||
await this.storageService.save(
|
||||
account.profile.userId,
|
||||
account,
|
||||
await this.defaultOnDiskMemoryOptions()
|
||||
);
|
||||
await this.saveAccount(account, await this.defaultOnDiskLocalOptions());
|
||||
}
|
||||
|
||||
protected async scaffoldNewAccountSessionStorage(account: TAccount): Promise<void> {
|
||||
@ -2278,11 +2270,7 @@ export class StateService<
|
||||
storedAccount.settings.environmentUrls = account.settings.environmentUrls;
|
||||
account.settings = storedAccount.settings;
|
||||
}
|
||||
await this.storageService.save(
|
||||
account.profile.userId,
|
||||
account,
|
||||
await this.defaultOnDiskOptions()
|
||||
);
|
||||
await this.saveAccount(account, await this.defaultOnDiskLocalOptions());
|
||||
}
|
||||
//
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user