When I try to connect with WalletConnectV2Adapter with Ethereum chain configured and having Polygon selected on the metamask app as current network. It connects but I cannot do a personal sign. When I try to get the chainId it always returns 0x1 but on the metamask app I’m actually on 0x89.
Tried calling wallet_switchEthereumChain
but it doesn’t work either.
- SDK Version: @web3auth/wallet-connect-v2-adapter 6.1.7
- Platform: iOS
- Browser Console Screenshots:
const coreAuthInstance = new Web3AuthNoModal({
chainConfig: {
displayName: "Ethereum Mainnet",
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: "0x1",
rpcTarget: ".....",
blockExplorer: "https://etherscan.io/",
ticker: "ETH",
tickerName: "Ethereum",
},
clientId,
web3AuthNetwork: "cyan",
});
const defaultWcSettings = await getWalletConnectV2Settings(
chainNamespace,
[chainId],
this.walletConnectClientId
);
const walletConnectV2Adapter = new WalletConnectV2Adapter({
adapterSettings: {
...defaultWcSettings.adapterSettings,
qrcodeModal: {
open: async (uri) => {
if (!uri) {
return;
}
await this.walletConnectModal.openModal({
uri,
standaloneChains: [`${chainNamespace}:${chainId}`],
});
},
close: () => {
this.walletConnectModal.closeModal();
},
},
},
loginSettings: {
...defaultWcSettings.loginSettings,
},
});
coreAuthInstance.configureAdapter(walletConnectV2Adapter);
const provider = await coreAuthInstance.connectTo("wallet-connect-v2")
const ethereumWeb3Provider = new Web3Provider(provider, "any");
const signer = provider.getSigner(walletAddress);
const signed = signer.signMessage(message); // < - - BREAKS