@@ -17,7 +17,6 @@ import { StateService as BaseStateService } from "../../deps/bw/libs/shared/dist
17import { PasswordTokenRequest } from "../../deps/bw/libs/shared/dist/src/models/request/identityToken/passwordTokenRequest";
17import { PasswordTokenRequest } from "../../deps/bw/libs/shared/dist/src/models/request/identityToken/passwordTokenRequest";
18import { TokenRequestTwoFactor } from "../../deps/bw/libs/common/src/models/request/identityToken/tokenRequestTwoFactor.ts";
18import { TokenRequestTwoFactor } from "../../deps/bw/libs/common/src/models/request/identityToken/tokenRequestTwoFactor.ts";
21function sanitize(obj) {
20function sanitize(obj) {
22 return JSON.parse(JSON.stringify(obj));
21 return JSON.parse(JSON.stringify(obj));
@@ -201,7 +200,12 @@ class BrowserCryptoService extends CryptoService {
201 async retrieveKeyFromStorage(keySuffix) {
200 async retrieveKeyFromStorage(keySuffix) {
202 if (keySuffix === "biometric") {
201 if (keySuffix === "biometric") {
203 await this.platformUtilService.authenticateBiometric();
202 await this.platformUtilService.authenticateBiometric();
204− return (await this.getKey())?.keyB64;
203+ const k = await this.getKey()
207 return await super.retrieveKeyFromStorage(keySuffix);
211 return await super.retrieveKeyFromStorage(keySuffix);
@@ -502,8 +506,8 @@ class StateService extends BaseStateService {
504 async getBrowserGroupingComponentState(options) {
508 async getBrowserGroupingComponentState(options) {
505− return (await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))
509+ const x = await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions))
506− ?.groupings;
510+ return x == null ? null : x.groupings;
509 async setBrowserGroupingComponentState(value, options) {
513 async setBrowserGroupingComponentState(value, options) {
@@ -515,8 +519,8 @@ class StateService extends BaseStateService {
517 async getBrowserCipherComponentState(options) {
521 async getBrowserCipherComponentState(options) {
518− return (await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))
522+ const x = await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions))
519− ?.ciphers;
523+ return x == null ? null : x.ciphers;
522 async setBrowserCipherComponentState(value, options) {
526 async setBrowserCipherComponentState(value, options) {
@@ -528,8 +532,8 @@ class StateService extends BaseStateService {
530 async getBrowserSendComponentState(options) {
534 async getBrowserSendComponentState(options) {
531− return (await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))
535+ const x = await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions))
532− ?.send;
536+ return x == null ? null : x.send;
535 async setBrowserSendComponentState(value, options) {
539 async setBrowserSendComponentState(value, options) {
@@ -540,8 +544,8 @@ class StateService extends BaseStateService {
540 await this.saveAccount(account, this.reconcileOptions(options, this.defaultInMemoryOptions));
544 await this.saveAccount(account, this.reconcileOptions(options, this.defaultInMemoryOptions));
542 async getBrowserSendTypeComponentState(options) {
546 async getBrowserSendTypeComponentState(options) {
543− return (await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))
547+ const x = await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions))
544− ?.sendType;
548+ return x == null ? null : x.sendType;
547 async setBrowserSendTypeComponentState(value, options) {
551 async setBrowserSendTypeComponentState(value, options) {