Torus Wallet fails to connect to Mainnet during v7.5->v8.3 upgrade

I’m upgrade a Dapp that uses web3auth and torus wallet, from v7.3.2 to v8.3.0.

I’m adding the torus wallet as an adapter to web3auth using the same chainConfig as for web3auth, but finding that torus wallet seems to believe its on the testnet, displays “Allow localhost change your network to Polygon Mainnet” and on attempting to change to mainnet refuses, resulting in an error that says “Custom, Not connected to correct chainId. Expected: 0x89, Current: 0x13881”

web3auth is configure to 0x89 and is connected, metamask connects correctly without issue, but somehow torus wallet doesn’t even think it’s connected to mainnet.

Any ideas on whats the issue?

hi @shaun.underwood,

I hope you are doing well!

I would talk about this issue with the team. But could you change your testnet from Mumbai (0x13881) to Amoy(0x13882) and try again?

Please contact me if this solves your issue or not.

Thanks for replying Tom!

That is a symptom of the problem. The chainConfig.chainId=0x89. I have Amoy setup as a TESTNET constant but that is never used. Here’s the config i supply to W3A.

{
  "chainId": "0x89",
  "rpcTarget": "https://polygon-rpc.com/",
  "chainNamespace": "eip155",
  "displayName": "Polygon Mainnet",
  "blockExplorerUrl": "https://polygonscan.com/",
  "ticker": "MATIC",
  "tickerName": "Matic",
  "logo": "https://images.toruswallet.io/matic.svg"
}

Hi @shaun.underwood,

I hope you’re doing well. We’re currently working on an update for the Torus wallet, scheduled for release in approximately 1 month. Would you be able to postpone your upgrade until after the update? Thank you for your understanding!

Thank you @TomTom .

Our COO did a thorough job of testing all the integrations and found that when logging in using W3A via all social media SSO options the Torus Wallet widget displayed, EXCEPT Facebook. When logging in using Facebook SSO the Torus Wallet widget did NOT display itself.

When logging in with Metamask the Torus Wallet widget also did not display, but from experience I believe this is the correct outcome, as we’re using Metamask NOT Torus Wallet.

So, the Facebook SSO might be something else to also check.

But for us the concern is Torus Wallet. We are disabling Torus Wallet login option for the time being, and waiting for your update, then we’ll retest and let you know the outcome.

Thanks for looking into this!

Thanks a lot for the information, I will let the team know about this.

I will contact you again as soon as I have news.

1 Like

Quick question; why did you ask us to use 13882 instead of 80002? 13882 isn’t listed on https://chainlist.wtf/

hi @shaun.underwood

80002 to hex = 0x13882

In the chainId we use the hexadecimal value.

1 Like

Just another FYI; since upgrading we found google sso users have often had to clear their cache else they’d receive this message several times:

missing revert data call exception; Transaction reverted without reason string

We also have evidence that Discord and Apple SSO and other SSO options frequently ask users to re-login.

Granted, these may have something to do with our setup, but thought it worth raising to keep your whits about you.