Skip to content

Porto wagmi connector throws an error when trying to get wallet client with specified chain id. #1050

@t0rbik

Description

@t0rbik

Check existing issues

Describe the bug

I am using useWalletClient with chainId passed. My wagmi config is multichain.
useWalletClient({chainId: _some not default chain id_}) throws a ChainMismatchError.
I would expect to receive a wallet client with specified chain id.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/vitejs-vite-bnito58r?file=src%2FApp.tsx

Steps To Reproduce

start app
connect with porto
see error:

Is wallet client defined: No
Error: The current chain of the connector (id: 84532) does not match the connection's chain (id: 11155420). Current Chain ID: 84532 Expected Chain ID: 11155420 Version: @wagmi/[email protected]

Porto Version

0.2.37

Viem Version

2.43.5

Wagmi Version

3.1.4

TypeScript Version

5.9.3

Anything else?

Please see another issue below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions