Skip to content

Commit

Permalink
chore: reduce console spam
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Meier <[email protected]>
  • Loading branch information
n0izn0iz committed Feb 27, 2024
1 parent 80183ef commit 40ee36f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 12 additions & 2 deletions packages/hooks/cosmwasm/useCosmWasmContractInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,18 @@ const useCosmWasmContractVersion = (
}

const client = await mustGetNonSigningCosmWasmClient(networkId);
const { info } = await client.queryContractSmart(address, { info: {} });
return info as ContractVersion;
try {
const { info } = await client.queryContractSmart(address, { info: {} });
return info as ContractVersion;
} catch (error) {
if (
error instanceof Error &&
error.message.includes("no such contract")
) {
return null;
}
throw error;
}
},
{ staleTime: Infinity },
);
Expand Down
2 changes: 0 additions & 2 deletions packages/hooks/useCollectionInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ export const useCollectionInfo = (

const r = cloneDeep(collectionInfo);

console.log("discord link", r.discord);

if (isLinkBanned(r.discord)) {
delete r.discord;
}
Expand Down

0 comments on commit 40ee36f

Please sign in to comment.