web3-mock
web3-mock copied to clipboard
Does not work properly with wagmi
When follow mocking connection
mock({
blockchain : 'ethereum',
accounts: {
return: ['0xd8da6bf26964af9d7eed9e03e53415d37aa96045']
}
})
config = createConfig({
autoConnect: true,
publicClient: createPublicClient({
chain: mainnet,
transport: custom(window.ethereum),
}),
})
and then try to check currently connected network byt useNetwork
hook it keeps returning undefined as well as const { isConnected, address } = useAccount()
gives respectively false
and undefined
.