1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-21 02:33:37 +00:00

[review] Rename stateService.purge to stateService.clean

This commit is contained in:
addison
2021-11-11 11:56:33 -05:00
parent ee59c19fa9
commit b095f7fcce
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ export abstract class StateService {
addAccount: (account: Account) => Promise<void>;
setActiveUser: (userId: string) => Promise<void>;
purge: (options?: StorageOptions) => Promise<void>;
clean: (options?: StorageOptions) => Promise<void>;
getAccessToken: (options?: StorageOptions) => Promise<string>;
setAccessToken: (value: string, options?: StorageOptions) => Promise<void>;

View File

@@ -76,7 +76,7 @@ export class StateService implements StateServiceAbstraction {
await this.pushAccounts();
}
async purge(options?: StorageOptions): Promise<void> {
async clean(options?: StorageOptions): Promise<void> {
await this.secureStorageService.remove(options?.userId ?? this.state.activeUserId);
await this.storageService.remove(options?.userId ?? this.state.activeUserId);
delete this.state.accounts[options?.userId ?? this.state.activeUserId];