Skip to content

Commit

Permalink
remove superfluous function
Browse files Browse the repository at this point in the history
  • Loading branch information
anton.trnovsky committed Sep 12, 2023
1 parent ace954b commit 69cacee
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/domains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ export async function fetchAndStoreDomains(): Promise<DomainScores> {
domainScores[url] = {score, reportUrl};
}

await saveLastDatabaseUpdateTimeStamp();
await chrome.storage.local.set({ domainScores, backup: domainScores });
const currentTimeStamp = Date.now();

await chrome.storage.local.set({
domainScores,
backup: domainScores,
lastDatabaseUpdate: currentTimeStamp
});

return domainScores;
}
Expand All @@ -44,11 +49,6 @@ export async function getLastDatabaseUpdateTimestamp() {
return response.lastDatabaseUpdate;
}

async function saveLastDatabaseUpdateTimeStamp() {
const currentTimeStamp = Date.now();
await chrome.storage.local.set({ lastDatabaseUpdate: currentTimeStamp });
}

async function getDomains(): Promise<DomainScores> {
const data = await chrome.storage.local.get(['lastDatabaseUpdate', 'domainScores']);
const lastDatabaseUpdate = data.lastDatabaseUpdate;
Expand Down

0 comments on commit 69cacee

Please sign in to comment.