ChainId always 0 for the Brave iOS connector when using Wagmi

Please only post Brave Wallet inquiries in this category – visit the Brave Rewards category for all related rewards issues.

The Brave Team will never ask you for your recovery phrase or private key.


Description of the issue:

When using Brave wallet on iOS and Wagmi’s `useAccount`, the chainId is always set to 0.
The underlying problem seems to be that there is something wrong with the connector; it also says there is no function `f.connector.getChainId` when using useSignMessage

I’ve tried using the Brave connector and the Injected connector, same result.

Strangely, Wagmi’s useChainId reports the correct chain.

Is the issue occurring on a specific network? No

What operating system are you using? iOS

Brave Version (check About Brave): 1.82.1

Additional Information: Works fine with MacOS extension

I also see this error in my logs WKWebView API client did not respond to this postMessage