Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Example] The example is not working #36

Open
AyushBherwani1998 opened this issue Oct 24, 2023 · 14 comments
Open

[Example] The example is not working #36

AyushBherwani1998 opened this issue Oct 24, 2023 · 14 comments
Assignees
Labels
Low Priority Will be considered but has low priority

Comments

@AyushBherwani1998
Copy link

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:

  1. Add project id
  2. Click on any wallet of your choice, tried with Metamask, Trust, and Rainbow.
  3. See the wallet open but no connection request is shown

** Screenshot **
As you can see, it says connecting, but it never shows any connection request.
IMG_C7CE215DE74E-1

Expected behavior
A connection request should be shown when the wallet opens.

Smartphone (please complete the following information):

  • Device: iPhone 11
  • OS: iOS 16
@quetool
Copy link
Collaborator

quetool commented Oct 24, 2023

Hello @AyushBherwani1998, is this still happening? Just to understand better, what you have done is:

  1. Clone the repo
  2. Set your projectId in /example/lib/home_page.dart
  3. Ran the app and tried to connect with those wallets
    Is that correct? Coz I have been doing the same and I'm able to connect properly.

@AyushBherwani1998
Copy link
Author

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.

@quetool
Copy link
Collaborator

quetool commented Oct 24, 2023

Do you mind trying Web3Modal? https://github.com/WalletConnect/Web3ModalFlutter

@quetool
Copy link
Collaborator

quetool commented Oct 24, 2023

@AyushBherwani1998
Copy link
Author

Sure, let me go through it.

@AyushBherwani1998
Copy link
Author

@quetool web3modal_flutter is working fine. Tried the 3.0.0-beta09 version.

@quetool
Copy link
Collaborator

quetool commented Oct 24, 2023

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.

@AyushBherwani1998
Copy link
Author

AyushBherwani1998 commented Oct 24, 2023

@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.

@quetool
Copy link
Collaborator

quetool commented Oct 24, 2023

@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.

@AyushBherwani1998
Copy link
Author

AyushBherwani1998 commented Oct 25, 2023

@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.

@quetool
Copy link
Collaborator

quetool commented Oct 25, 2023

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 quetool self-assigned this Oct 25, 2023
@AyushBherwani1998
Copy link
Author

@quetool any updates?

@quetool
Copy link
Collaborator

quetool commented Dec 20, 2023

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.

@quetool
Copy link
Collaborator

quetool commented Dec 20, 2023

Also, I strongly recommend to try Web3Modal out, it has been released for production since we last spoken 👌

@quetool quetool added the Low Priority Will be considered but has low priority label Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Low Priority Will be considered but has low priority
Projects
None yet
Development

No branches or pull requests

2 participants