Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
Save usesKeyConnector using defaultOnDiskOptions (#617)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliykat committed Jan 20, 2022
1 parent 9737c82 commit 11e7133
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions common/src/services/state.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1993,16 +1993,20 @@ export class StateService<TAccount extends Account = Account>
}

async getUsesKeyConnector(options?: StorageOptions): Promise<boolean> {
return (await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))
?.profile?.usesKeyConnector;
return (
await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()))
)?.profile?.usesKeyConnector;
}

async setUsesKeyConnector(value: boolean, options?: StorageOptions): Promise<void> {
const account = await this.getAccount(
this.reconcileOptions(options, this.defaultInMemoryOptions)
this.reconcileOptions(options, await this.defaultOnDiskOptions())
);
account.profile.usesKeyConnector = value;
await this.saveAccount(account, this.reconcileOptions(options, this.defaultInMemoryOptions));
await this.saveAccount(
account,
this.reconcileOptions(options, await this.defaultOnDiskOptions())
);
}

async getVaultTimeout(options?: StorageOptions): Promise<number> {
Expand Down

0 comments on commit 11e7133

Please sign in to comment.