DePayFi / web3-mock

🤡 JavaScript library to mock web3 responses either by emulating web3 wallets or web3 RPC requests.
https://depay.com
MIT License
87 stars 20 forks source link

Does not work properly with wagmi #32

Closed pociej closed 1 month ago

pociej commented 1 year ago

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.

0xNe0x1 commented 1 month ago

sorry, but wagmi if officially not supported.