Skip to content

Commit

Permalink
Merge pull request #633 from subquery/feat/studio-enable-error
Browse files Browse the repository at this point in the history
fix: hidden useless error
  • Loading branch information
HuberTRoy authored Jan 15, 2024
2 parents cbbcf32 + f842a6b commit 190b973
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/hooks/useStudio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ export function useStudioEnabled() {

const checkStudioEnabled = useCallback(async () => {
if (!contracts || !account) return;
const studioEnabled = await contracts.queryRegistry.creatorWhitelist(account);
setStudioEnabled(studioEnabled);
try {
const studioEnabled = await contracts.queryRegistry.creatorWhitelist(account);
setStudioEnabled(studioEnabled);
} catch (e) {
// don't care this error
}
}, [contracts, account]);

useEffect(() => {
Expand Down

0 comments on commit 190b973

Please sign in to comment.