From fc6a24fbc3bc409616c90808a5356f4b3080e5ad Mon Sep 17 00:00:00 2001 From: Sriram Hariharan Date: Sat, 13 Apr 2024 14:22:11 -0500 Subject: [PATCH] added storeId prepending --- package.json | 2 +- src/storage/createStore.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 30d0981..79a914a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chrome-extension-toolkit", - "version": "0.0.63", + "version": "0.0.64", "description": "A template for creating npm packages using TypeScript and VSCode", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/storage/createStore.ts b/src/storage/createStore.ts index 0bf2117..64e5fc9 100644 --- a/src/storage/createStore.ts +++ b/src/storage/createStore.ts @@ -146,7 +146,8 @@ function createStore( const defaultsToSet = {}; for (const key of missingKeys) { - defaultsToSet[key] = isEncrypted ? await security.encrypt(defaults[key]) : defaults[key]; + const value = defaults[key.replace(`${storeId}:`, '')]; + defaultsToSet[key] = isEncrypted ? await security.encrypt(value) : value; } await chrome.storage[area].set(defaultsToSet);