wallet-connectweb3-reactwagmi

wagmi walletConnect: Unsupported chains. connect() requiredNamespace:


Trying to connect wagmi to use walletConnect I took the guide from the official Wagmi docs nothing was changed. It works if I include this in create-react-app, but when I integrate it into my project it gives this error when I click WalletConnect button:

Unsupported chains. connect() requiredNamespace, chain [object Set] should be a string and conform to "namespace:chainId" format

Error: Unsupported chains. connect() requiredNamespace, chain [object Set] should be a string and conform to "namespace:chainId" format
    at tslib.es6.js:212:39
LOG @ browser.js:202
(anonymous) @ tslib.es6.js:212
Promise.then (async)
(anonymous) @ tslib.es6.js:212
connect @ tslib.es6.js:212
$If_6 @ walletConnect.js:85
(anonymous) @ walletConnect.js:1
Promise.then (async)
(anonymous) @ walletConnect.js:77
connect @ walletConnect.js:65
(anonymous) @ chunk-VQG3VKOR.js:727
connect @ chunk-VQG3VKOR.js:717
mutationFn @ index.js:649
fn @ mutation.mjs:87
run @ retryer.mjs:101
createRetryer @ retryer.mjs:149
executeMutation @ mutation.mjs:81
execute @ mutation.mjs:138
await in execute (async)
mutate @ mutationObserver.mjs:85
(anonymous) @ useMutation.mjs:19
(anonymous) @ index.js:680
onClick @ index.js:57
callCallback @ react-dom.development.js:4164
invokeGuardedCallbackDev @ react-dom.development.js:4213
invokeGuardedCallback @ react-dom.development.js:4277
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291
executeDispatch @ react-dom.development.js:9041
processDispatchQueueItemsInOrder @ react-dom.development.js:9073
processDispatchQueue @ react-dom.development.js:9086
dispatchEventsForPlugins @ react-dom.development.js:9097
(anonymous) @ react-dom.development.js:9288
batchedUpdates$1 @ react-dom.development.js:26140
batchedUpdates @ react-dom.development.js:3991
dispatchEventForPluginEventSystem @ react-dom.development.js:9287
dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465
dispatchEvent @ react-dom.development.js:6457
dispatchDiscreteEvent @ react-dom.development.js:6430

Node 18, SSR with backend on Express and @loadable


Solution

  • Fixed by removing from @babel/preset-env exclude: ["transform-async-to-generator"] and loose: true option