Skip to content

Commit

Permalink
fix: remove bounty board status caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldszar committed Oct 20, 2024
1 parent 5bb15f4 commit 669a079
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions src/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,21 @@ async function openBountyBoard() {
}

async function fetchStatus() {
let { status } = await browser.storage.session.get({
status: null,
});

if (status == null) {
const [{ data }] = await getBountyBoardSettings();
const [{ data }] = await getBountyBoardSettings();

if (data == null) {
return "NONE";
}

const {
user: { bountyBoardSettings },
} = data;
if (data == null) {
return "NONE";
}

status = bountyBoardSettings.status;
const {
user: {
bountyBoardSettings: { status },
},
} = data;

browser.storage.session.set({
status,
});
}
browser.storage.session.set({
status,
});

return status;
}
Expand Down

0 comments on commit 669a079

Please sign in to comment.