switch the encryption secret from localStorage to IndexedDB (because localStorage gets lost so often)

This commit is contained in:
2024-12-08 19:34:31 -07:00
parent ed4a9e581b
commit 251649e6fe
35 changed files with 295 additions and 255 deletions

View File

@@ -149,7 +149,6 @@ import QuickNav from "@/components/QuickNav.vue";
import EntityIcon from "@/components/EntityIcon.vue";
import { NotificationIface } from "@/constants/app";
import {
accountsDB,
db,
retrieveSettingsForActiveAccount,
updateAccountSettings,
@@ -163,6 +162,7 @@ import {
OfferSummaryRecord,
OfferToPlanSummaryRecord,
} from "@/libs/endorserServer";
import { retrieveAccountDids } from "@/libs/util";
@Component({
components: { GiftedDialog, QuickNav, EntityIcon },
@@ -196,12 +196,7 @@ export default class NewActivityView extends Vue {
settings.lastAckedOfferToUserProjectsJwtId || "";
this.allContacts = await db.contacts.toArray();
await accountsDB.open();
const allAccounts = await accountsDB.accounts.toArray();
if (allAccounts.length > 0) {
this.allMyDids = allAccounts.map((acc) => acc.did);
}
this.allMyDids = await retrieveAccountDids();
const offersToUserData = await getNewOffersToUser(
this.axios,