web: fix all tests

This commit is contained in:
Abdullah Atta
2024-04-20 16:42:04 +05:00
parent 0e4cd087d4
commit f95c068bc1
38 changed files with 414 additions and 185 deletions

View File

@@ -140,12 +140,14 @@ class KeyStore extends BaseStore<KeyStore> {
) {
super(setState, get);
this.#metadataStore = isFeatureSupported("indexedDB")
? new IndexedDBKVStore(`${dbName}-metadata`, "metadata")
: new MemoryKVStore();
this.#secretStore = isFeatureSupported("indexedDB")
? new IndexedDBKVStore(`${dbName}-secrets`, "secrets")
: new MemoryKVStore();
this.#metadataStore =
isFeatureSupported("indexedDB") && isFeatureSupported("clonableCryptoKey")
? new IndexedDBKVStore(`${dbName}-metadata`, "metadata")
: new MemoryKVStore();
this.#secretStore =
isFeatureSupported("indexedDB") && isFeatureSupported("clonableCryptoKey")
? new IndexedDBKVStore(`${dbName}-secrets`, "secrets")
: new MemoryKVStore();
}
activeCredentials = () => this.get().credentials.filter((c) => c.active);