Skip to content

Commit

Permalink
default to false priority on storage failure
Browse files Browse the repository at this point in the history
  • Loading branch information
victorkirov committed Jan 25, 2024
1 parent dc56c09 commit 584aab1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/app/utils/chromeLocalStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ export const chromeLocalStorageKeys = {

export function getIsPriorityWallet(): Promise<boolean> {
return new Promise((resolve) => {
chrome.storage.local.get(chromeLocalStorageKeys.isPriorityWallet, (result) => {
resolve(result[chromeLocalStorageKeys.isPriorityWallet]);
});
try {
chrome.storage.local.get(chromeLocalStorageKeys.isPriorityWallet, (result) => {
resolve(result[chromeLocalStorageKeys.isPriorityWallet]);
});
} catch (e) {
resolve(false);
}
});
}

0 comments on commit 584aab1

Please sign in to comment.