web3-mock icon indicating copy to clipboard operation
web3-mock copied to clipboard

Does not work properly with wagmi

Open pociej opened this issue 8 months ago • 0 comments

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.

pociej avatar Oct 21 '23 19:10 pociej