1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 15:23:33 +00:00
Files
browser/src/services/state.service.ts
Addison Beck 653ff8f45f [Bug] VaultTimeout incorrectly defaults to "Never" (#1230)
* [Bug] VaultTimeout incorrectly defaults to "Never"

The default desktop vault timeout value is "On Restart", but there is no default set for this in the state service and account model.
This commit extends the StateService and Account model to consider the special vault timeout default requirements needed for desktop.

* [style] Lint fixes

* [chore] Update jslib
2022-01-12 11:37:23 -05:00

14 lines
506 B
TypeScript

import { StateService as BaseStateService } from "jslib-common/services/state.service";
import { Account } from "../models/account";
import { StateService as StateServiceAbstraction } from "jslib-common/abstractions/state.service";
export class StateService extends BaseStateService<Account> implements StateServiceAbstraction {
async addAccount(account: Account) {
// Apply desktop overides to default account values
account = new Account(account);
await super.addAccount(account);
}
}