# \[Archive\] Chain Not Supported Error when using WalletConnect V2 Binance Smart chain

**URL:** <https://builder.metamask.io/t/archive-chain-not-supported-error-when-using-walletconnect-v2-binance-smart-chain/1886>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [July 11, 2023, 7:31am UTC](https://builder.metamask.io/t/archive-chain-not-supported-error-when-using-walletconnect-v2-binance-smart-chain/1886 "2023-07-11T07:31:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![neha.decrypt](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@neha.decrypt](https://builder.metamask.io/u/neha.decrypt)\
**Post date:** [July 11, 2023, 7:31am UTC](https://builder.metamask.io/t/archive-chain-not-supported-error-when-using-walletconnect-v2-binance-smart-chain/1886/1 "2023-07-11T07:31:10Z")

</div>

> **🏛 Archived Content from Web3Auth Community**
> 
> This topic was originally posted by **neha.decrypt** on 7/11/2023.  
> This content has been migrated from our previous community forum to preserve valuable discussions.

* * *

**Please provide the following details too when asking for help in this category:**

- SDK Version: 6.1.3
- Platform: WebApp (React.js)
- Browser Console Screenshots:  
 ![image](https://canada1.discourse-cdn.com/flex011/uploads/metamaskbuilderhub/original/2X/3/3effe7297209c1aa8c1100d1b0b2060859ac860f.png)

**Please provide the Web3Auth initialization and login code snippet below:**  
const init = async () =\> {  
try {  
const web3auth = new Web3Auth({  
clientId,  
chainConfig: {  
chainNamespace: CHAIN\_NAMESPACES.EIP155,  
chainId: process.env.REACT\_APP\_CHAIN\_ID, // hex of 80001, polygon testnet  
rpcTarget: process.env.REACT\_APP\_RPC\_URL,  
blockExplorer: process.env.REACT\_APP\_EXPLORER\_URL  
},  
uiConfig: {  
appName: “DA”,  
appLogo: “[https://web3auth.io/community/images/w3a-L-Favicon-1.svg](https://web3auth.io/community/images/w3a-L-Favicon-1.svg)”, // Your App Logo Here  
theme: “light”,  
loginMethodsOrder: [“apple”, “google”, “twitter”],  
defaultLanguage: “en”, // en, de, ja, ko, zh, es, fr, pt, nl  
loginGridCol: 3,  
primaryButton: “externalLogin”, // “externalLogin” | “socialLogin” | “emailLogin”  
},  
web3AuthNetwork: “mainnet”,  
});

```
    const openloginAdapter = new OpenloginAdapter({
      loginSettings: {
        mfaLevel: "optional",
      },
      adapterSettings: {
        uxMode: "popup", // "redirect" | "popup"
        whiteLabel: {
          name: "Digital Arms",
          logoLight: "https://web3auth.io/community/images/w3a-L-Favicon-1.svg",
          logoDark: "https://web3auth.io/community/images/w3a-D-Favicon-1.svg",
          defaultLanguage: "en", // en, de, ja, ko, zh, es, fr, pt, nl
          dark: false, // whether to enable dark mode. defaultValue: false
        },
        mfaSettings: {
          deviceShareFactor: {
            enable: true,
            priority: 1,
            mandatory: true,
          },
          backUpShareFactor: {
            enable: true,
            priority: 2,
            mandatory: false,
          },
          socialBackupFactor: {
            enable: true,
            priority: 3,
            mandatory: false,
          },
          passwordFactor: {
            enable: true,
            priority: 4,
            mandatory: false,
          },
        },
      },
    });
    web3auth.configureAdapter(openloginAdapter);
const defaultWcSettings = await getWalletConnectV2Settings(
  "eip155",
  [1, 137, 5, 56],
  "04309ed1007e77d1f119b85205bb779d"
);
const walletConnectV2Adapter = new WalletConnectV2Adapter({
  adapterSettings: { ...defaultWcSettings.adapterSettings },
  loginSettings: { ...defaultWcSettings.loginSettings },
});

web3auth.configureAdapter(walletConnectV2Adapter);

// adding metamask adapter
const metamaskAdapter = new MetamaskAdapter({
  clientId,
  sessionTime: 3600, // 1 hour in seconds
  web3AuthNetwork: "mainnet",
  chainConfig: {
    chainNamespace: CHAIN_NAMESPACES.EIP155,
    chainId: process.env.REACT_APP_CHAIN_ID,
    rpcTarget: process.env.REACT_APP_RPC_URL, // This is the public RPC we have added, please pass on your own endpoint while creating an app
  },
});
// we can change the above settings using this function
metamaskAdapter.setAdapterSettings({
  sessionTime: 86400, // 1 day in seconds
  chainConfig: {
    chainNamespace: CHAIN_NAMESPACES.EIP155,
    chainId: process.env.REACT_APP_CHAIN_ID,
    rpcTarget: process.env.REACT_APP_RPC_URL, // This is the public RPC we have added, please pass on your own endpoint while creating an app
  },
  web3AuthNetwork: "mainnet",
});

// it will add/update the metamask adapter in to web3auth class
web3auth.configureAdapter(metamaskAdapter);

const torusWalletAdapter = new TorusWalletAdapter({
  clientId,
});

// it will add/update the torus-evm adapter in to web3auth class
web3auth.configureAdapter(torusWalletAdapter);

setWeb3auth(web3auth);

await web3auth.initModal();

setProvider(web3auth.provider);

if (web3auth.connected) {
  console.log("Connected")
  setProvider(web3auth.provider);
  setAccount(cookies["selected_account"]);
  console.log("account 1 is--------&gt;", cookies["selected_account"]);
  // setLoggedIn(true);
}

```

---

<div class="post-metadata">

**Author:** ![vjgee](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vjgee](https://builder.metamask.io/u/vjgee)\
**Post date:** [July 11, 2023, 3:20pm UTC](https://builder.metamask.io/t/archive-chain-not-supported-error-when-using-walletconnect-v2-binance-smart-chain/1886/2 "2023-07-11T15:20:32Z")

</div>

@neha.decrypt Thanks for reaching out.

Your issue has been forwarded to our team and we will get back with further updates once more information becomes available.

---

<div class="post-metadata">

**Author:** ![chai](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@chai](https://builder.metamask.io/u/chai)\
**Post date:** [July 13, 2023, 1:56pm UTC](https://builder.metamask.io/t/archive-chain-not-supported-error-when-using-walletconnect-v2-binance-smart-chain/1886/3 "2023-07-13T13:56:21Z")

</div>

pls provide info on which application you’re connecting to.  
The error tells me that app doesn’t support the chains you’re whitelisting in walletconnectv2adapter initialization

---

<div class="post-metadata">

**Author:** ![neha.decrypt](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@neha.decrypt](https://builder.metamask.io/u/neha.decrypt)\
**Post date:** [July 14, 2023, 5:10am UTC](https://builder.metamask.io/t/archive-chain-not-supported-error-when-using-walletconnect-v2-binance-smart-chain/1886/4 "2023-07-14T05:10:24Z")

</div>

Hi Chai, Thank for the response.  
I am using binance smart chain in my application and trying to run it on my local system.  
Its able to connect with metamask and openlogin.

---

<div class="post-metadata">

**Author:** ![neha.decrypt](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@neha.decrypt](https://builder.metamask.io/u/neha.decrypt)\
**Post date:** [July 17, 2023, 9:11am UTC](https://builder.metamask.io/t/archive-chain-not-supported-error-when-using-walletconnect-v2-binance-smart-chain/1886/5 "2023-07-17T09:11:12Z")

</div>

Hi @chai ,  
I got it, the problem was with ethereum chain, its not supported i think. I tried with only 56 chain id, it worked but now its not able to sign personal message correctly with trustwallet. Recovering address from signature is giving different address from the address which actually signs the transaction
