1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-14 02:08:50 +02:00

Run addAccount storage scaffolding calls through saveAccount (#675)

This commit is contained in:
Addison Beck 2022-02-11 11:12:18 -05:00 committed by GitHub
parent e3b29a40d3
commit cdc6cbaeb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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());
}
//