Can't create wallet provider from FuelWeb3Provider constructor

I have tried to create wallet provider like it described in this article, but faced this error

Cannot read properties of undefined (reading ‘url’)

I also checked that it’s required to pass url in connect function

 const config = { url: "" };
    const res = await window.FuelWeb3?.connect(config);

but it didn’t help


This feature is not working correctly now, but we are working on it. You can keep track of this issue: Currently when user changes network DApp application can't use the new network · Issue #393 · FuelLabs/fuels-wallet · GitHub