Skip to content

Commit

Permalink
[ENG-5328] Settings - Use Xverse as default wallet - toggle on/off do…
Browse files Browse the repository at this point in the history
…es not respond (#633)
  • Loading branch information
dhriaznov authored Sep 30, 2024
1 parent 5d48190 commit ce41286
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/hooks/useChromeLocalStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ const useChromeLocalStorage = <T extends unknown>(key: string, defaultValue?: T)
const queryClient = useQueryClient();

const { data: value, isFetching } = useQuery({
queryKey: ['chromeLocalStorage', key, defaultValue],
// eslint-disable-next-line @tanstack/query/exhaustive-deps
queryKey: ['chromeLocalStorage', key],
queryFn: async () => {
const result = await chromeStorage.local.getItem<T>(key);
return result === undefined ? defaultValue : result;
},
refetchOnWindowFocus: false,
refetchOnMount: false,
staleTime: 60 * 60 * 1000, // 1 hour
});

const mutation = useMutation({
Expand Down

0 comments on commit ce41286

Please sign in to comment.