-
|
Really great work here on this lib. I'm refactoring an app to use this. Currently I'm using How would I achieve this or similar with wagmi? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Since you are able to just implement a custom provider and connector, you are free to use whatever RPC, etc you want. Have a look at the example code for a short intro into this topic: https://github.com/tmm/wagmi/blob/main/examples/next/src/pages/_app.tsx#L18-L46 |
Beta Was this translation helpful? Give feedback.
-
|
Yes, in const connectors = [
WalletConnectConnector({
chains: [chain.mainnet, chain.rinkeby],
options: {
...
},
})
]When someone connects to an unsupported network, you can use the Will consider adding |
Beta Was this translation helpful? Give feedback.
Yes, in
wagmiyou define supported chains on a per connector-basic.InjectedConnector,WalletConnectConnector, etc. all have achainsproperty. For example,When someone connects to an unsupported network, you can use the
useNetworkhook to identify that it is unsupported (data.unsupported) and show a prompt for switching the network.Will consider adding
unsupportedsomewhere to response ofconnector.connectas well.