From 358ef7cfb02e56baa63fbb444dc7fe1fac28ffd7 Mon Sep 17 00:00:00 2001 From: Roland Osborne Date: Mon, 24 Oct 2022 13:46:40 -0700 Subject: [PATCH] first run record name cleanup --- app/mobile/src/context/useStoreContext.hook.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/mobile/src/context/useStoreContext.hook.js b/app/mobile/src/context/useStoreContext.hook.js index 74e9f824..4af3da1e 100644 --- a/app/mobile/src/context/useStoreContext.hook.js +++ b/app/mobile/src/context/useStoreContext.hook.js @@ -45,13 +45,11 @@ export function useStoreContext() { await db.current.executeSql("INSERT OR REPLACE INTO app (key, value) values (?, ?);", [dataId, encodeObject(profile)]); }, getFirstRun: async (guid) => { - const dataId = `${guid}_first_run`; - const firstRun = await getAppValue(db.current, dataId, { set: true }); + const firstRun = await getAppValue(db.current, "firstrun", { set: true }); return firstRun.set; }, - setFirstRun: async (guid) => { - const dataId = `${guid}_first_run`; - await db.current.executeSql("INSERT OR REPLACE INTO app (key, value) values (?, ?);", [dataId, encodeObject({ set: false })]); + setFirstRun: async () => { + await db.current.executeSql("INSERT OR REPLACE INTO app (key, value) values (?, ?);", ["firstrun", encodeObject({ set: false })]); }, getCardRequestStatus: async (guid) => { const dataId = `${guid}_card_status`;