You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sort of an issue if developers using wagmi 1.x wish to use this to plugNPlay with their existing wagmi hooks.
Feature Description
It would be good to go back to wagmi 1.x and get a config setup and working to work with older wagmi versions.
Trying to use web3-onboard with older 1.x versions leads to issues and errors where the wagmi client is not able to read wallet event changes. If this were to be produced, it would make wagmi and web3-onboard 100x easier. The current setup of using your own functions with a wagmi connector just adds long tedious code to the un-needed process. Wagmi should be the core without external modules overriding their internal functions.
Alternative Solutions
https://1.x.wagmi.sh/examples/custom-connector
Maybe the connector is the issue I'm not too sure but I know that when debugging the createConfig value, it's different from my 1.x wagmi config.
### Something like this would make all of our lives easier:
import Web3OnBoardConnector from '@web3-onboard/connector';
import { useAccount, sendTransaction } from 'wagmi';
const ClientData = () => {
const { isConnected, address, connector } = useAccount();
return (
<div>
<h1>Client Data</h1>
<p>isConnected: {isConnected ? 'true' : 'false'}</p>
<p>address: {address}</p>
<p>connector: {connector}</p>
</div>
);
}
// Example on how to send a transaction
// Note: it would use wagmi functions to send a transaction and keep the provider under the hood like wagmi does
// for ease and access anywhere
// as soon as the wagmi config is created and passed to the <WagmiConfig> it would be accessible anywhere within the wrapper
const sendATransaction = async () => {
const tx = await sendTransaction({
to: '0x0000000000000000000000000000000000000000',
value: parseEther('1'),
});
}
const App = () => {
var wagmiConfig = createConfig({
autoConnect: false,
connectors: [new Web3OnBoardConnector({options: {}})],
publicClient,
webSocketPublicClient
});
<WagmiConfig config={wagmiConfig}>
<ClientData />
</WagmiConfig>
}
The text was updated successfully, but these errors were encountered:
Is your request related to a problem?
Sort of an issue if developers using wagmi 1.x wish to use this to plugNPlay with their existing wagmi hooks.
Feature Description
It would be good to go back to wagmi 1.x and get a config setup and working to work with older wagmi versions.
Trying to use web3-onboard with older 1.x versions leads to issues and errors where the wagmi client is not able to read wallet event changes. If this were to be produced, it would make wagmi and web3-onboard 100x easier. The current setup of using your own functions with a wagmi connector just adds long tedious code to the un-needed process. Wagmi should be the core without external modules overriding their internal functions.
Alternative Solutions
https://1.x.wagmi.sh/examples/custom-connector
Maybe the connector is the issue I'm not too sure but I know that when debugging the createConfig value, it's different from my 1.x wagmi config.
I'm setting wagmi config like this in root:
And initializing web3-onboard like this:
Package.json is this:
### Something like this would make all of our lives easier:
The text was updated successfully, but these errors were encountered: