Open AyushBherwani1998 opened 10 months ago
Hello @AyushBherwani1998, is this still happening? Just to understand better, what you have done is:
/example/lib/home_page.dart
Hey @quetool, yes I did the same but apparently the connection request is not shown. Moreover, I tried those wallets with https://react-app.walletconnect.com/ and it works fine.
Do you mind trying Web3Modal? https://github.com/WalletConnect/Web3ModalFlutter
Sure, let me go through it.
@quetool web3modal_flutter is working fine. Tried the 3.0.0-beta09 version.
Great! Web3Modal is almost on release version, it's quite safe to use it already but I'd understand if you prefer to use WalletConnectModalFlutter. However it might take some time before I'm able to take a look at that repo.
@quetool got the issue, apparently the WalletConnectModalService
accepts both IWeb3App
and projectId
along with metadata
. I was setting the projectId
inside the home_page
but since the example passes the IWeb3App
it was causing the issue. It was working fine to show me the list of wallet, because it uses local variable projectId
in the Explorer service, and for the pairing and auth it uses IWeb3App
.
Just curious, we should only keep IWeb3App
instead of also accepting the projectId
and metadata
or vice versa to avoid confusion. Happy to raise the PR if it make sense to you.
@AyushBherwani1998 thats great! AFAIK it should be either the web3app instance (which requieres a projectId) OR the projectId into the service. So, should be either one or the other. We might need to take a look sooner than I thought.
@quetool would be happy to contribute. IMO we can deprecate the web3App
and only take the projectId
and metaData
. WDYT? In the more upcoming releases we can remove the web3App
once users have migrated to the remove the usage of web3App
. Since it's already published, we can do a soft migration.
That could be a good idea, I might need to check the impact. Btw by "we" I meant we at WalletConnect but I really appreciate the willingness! I will get back to you ASAP!
@quetool any updates?
Hey @AyushBherwani1998 ! Sorry for the delay on this! If you are asking about removing web3App object from the constructor I haven't had time to talk discuss this with the team but in any case is not a priority for us. Also, having the ability to pass a web3app as well allows the dev to have a bit more of flexibility since Web3App() accepts a Core() object itself.
What I can do right now to avoid your described issue is to add a check to validate web3App.core.projectId
over projectId
.
Also, I strongly recommend to try Web3Modal out, it has been released for production since we last spoken 👌
Describe the bug I have updated the project id in the sample, upon clicking the wallet, it does open the wallet but no request for connection is shown in the wallet.
To Reproduce Steps to reproduce the behavior:
Screenshot As you can see, it says connecting, but it never shows any connection request.![IMG_C7CE215DE74E-1](https://github.com/WalletConnect/WalletConnectModalFlutter/assets/34301187/dbcbdb26-7b4d-4ef0-97dd-3681591245f3)
Expected behavior A connection request should be shown when the wallet opens.
Smartphone (please complete the following information):