Access to Polygon default network

Hello

Using PnP, modal, initiated chainconfig using chainNamespace: CHAIN_NAMESPACES.EIP155 and ChainId: 0x89 for polygon.

Also using [Torus EVM Wallet UI Plugin], when user opens the wallet it connects to a custom network but also shows the default polygon network so 2 polygon network shown.

We would like to connect directly to the default polygon network, how is it possible as the custom network does not work with the top-up option and does not show assets to buy but the default polygon network does.

Thanks

Hey @Jon

Could you share any screenshots of the same? Also, which custom network is it showing?

Hello

Here is the solution, you need to put buildEnv:"polygon" in walletInitOptions, but nothing is specified in the documentation and we found out looking at the source code fyi.

torusPlugin = new TorusWalletConnectorPlugin({
torusWalletOpts: {
},
walletInitOptions: {
buildEnv:“polygon”,
showTorusButton: false,
whiteLabel: {
theme: { isDark: false, colors: { primary: “#123653”, background: “#123653”, torusBrand1: “#7c72ea” }, },

                    logoDark: logoLight,
                    logoLight: logoLight,
                    featuredBillboardHide: true,
                    disclaimerHide: true,
                    useWalletConnect: false,
                    enableLogging: true
                },
                featuredBillboardHide: true,
                disclaimerHide: true,
                useWalletConnect: false,
                enableLogging: true

            },
        });

Hope that helps others.
Thanks

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.