Skip to content

Commit

Permalink
Tidy away comments and unused properties
Browse files Browse the repository at this point in the history
  • Loading branch information
NigelBreslaw committed Feb 16, 2024
1 parent 34fe176 commit 191d907
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions native_gg/src/storage/StorageGG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ type storageKey = "item_definition" | "accounts";

class StorageGG {
private static instance: StorageGG;
private static isReady = false;
private nativeStore = new MMKV();

private constructor() {}
Expand All @@ -22,8 +21,6 @@ class StorageGG {
return StorageGG.instance;
}

private init() {}

static setData(data: JSON, storageKey: storageKey, errorMessage: string): Promise<void> {
return new Promise((resolve, reject) => {
if (Platform.OS === "web") {
Expand Down Expand Up @@ -60,12 +57,9 @@ class StorageGG {

openRequest.onsuccess = () => {
const db = openRequest.result;
// Start a transaction
const tx = db.transaction(Store.storeName, "readwrite");
// Get the store
const store = tx.objectStore(Store.storeName);

// Add the string to the store
const request = store.put(data, storageKey);
request.onsuccess = () => {
console.log("data added to the store", storageKey);
Expand Down

0 comments on commit 191d907

Please sign in to comment.