Chain * does not support contract "ensUniversalResolver" error/warning #781
alexnguyennz
started this conversation in
General
Replies: 4 comments 3 replies
-
Usually a couple. I don't want to put in logic just to handle Hardhat / anvil - silently failing is ok. |
Beta Was this translation helpful? Give feedback.
1 reply
-
i haven't monkeypatched a built-in since 2011 but here we are "use client";
import { useIsomorphicLayoutEffect } from "usehooks-ts";
// https://github.com/wagmi-dev/viem/discussions/781
export function useShutTheFuckUpAboutENS() {
useIsomorphicLayoutEffect(() => {
const orig = window.console.error;
window.console.error = function (...args) {
if (args[0]?.name === "ChainDoesNotSupportContract") return;
orig.apply(window.console, args);
};
}, []);
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
it's very annoying |
Beta Was this translation helpful? Give feedback.
0 replies
-
+1 for graceful failure here instead of this wall of text, which can print several times if a Dapp is multi-chain: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi can this be made less intense in a future release? It prints out a massive error block in console. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions