Add WalletServicesPlugin

Hi,
i have some problemi using WalletServicesPlugin.

I initialized my web3auth istance and then i add the Plugin like this:

  useEffect(() => {
    console.log('Attempting to initialize Web3Auth:', { web3auth });
    if (web3auth && web3auth.connected) {
      console.log('Adding WalletServicesPlugin:', { web3auth });
      const addPlugins = async () => {
        const walletServicesPlugin = new WalletServicesPlugin();
        web3auth.addPlugin(walletServicesPlugin);
        console.log(
          'walletServicesPlugin added successfully',
          walletServicesPlugin
        );
      };

      addPlugins().catch((error) =>
        console.error('Error adding WalletServicesPlugin:', error)
      );
    }
  }, [web3auth]);

All is fine, but the walletServicesPlugin is like this:

{
    "name": "WALLET_SERVICES_PLUGIN",
    "SUPPORTED_ADAPTERS": [
        "openlogin"
    ],
    "pluginNamespace": "eip155",
    "wsEmbedInstance": {
        "isInitialized": false,
        "modalZIndex": 99999
    },
    "provider": null,
    "web3auth": null,
    "isInitialized": false,
    "walletInitOptions": {}
}

with web3auth null so nothing work.

Some ideas?

hi @indirizzo722

It would be great if you can share me more code from your project

But i think you must call

web3auth.addPlugin(walletServicesPlugin);

before calling

await web3auth.init();