Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
get rid of method
Browse files Browse the repository at this point in the history
  • Loading branch information
eggplantzzz committed Jul 14, 2023
1 parent 42d496d commit 92cd396
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions packages/dashboard/src/contexts/DashContext/DashProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ function DashProvider({ children }: DashProviderProps): JSX.Element {
const dbHelper = useMemo(
() => ({
dbPromise: stateRef.current.dbPromise,
async getAllCompilations() {
const tx = (await this.dbPromise).transaction(
"Compilation",
"readonly"
);
const store = tx.objectStore("Compilation");
const compilations = await store.getAll();
return compilations.map(entry => entry.data);
},
async has(hash: string) {
return !!(await (await this.dbPromise).getKey("Compilation", hash));
},
Expand Down Expand Up @@ -313,7 +304,9 @@ function DashProvider({ children }: DashProviderProps): JSX.Element {
},
handleCompilations,
getCompilations: async (): Promise<Compilation[]> => {
return await dbHelper.getAllCompilations();
const { dbPromise } = state;
const compilations = await (await dbPromise).getAll("Compilation");
return compilations.map(entry => entry.data);
},
setDebuggerSessionData: ({
unknownAddresses,
Expand Down

0 comments on commit 92cd396

Please sign in to comment.