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

same provider not working for injected and other wallets #1912

Closed
1 task done
khushnood1037 opened this issue Sep 19, 2023 · 4 comments
Closed
1 task done

same provider not working for injected and other wallets #1912

khushnood1037 opened this issue Sep 19, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@khushnood1037
Copy link

Current Behavior

Is there a way to get an event about the type of wallet that user has connected to i.e, whether the wallet is injected one or not?

Expected Behavior

Need to work same provider for injected wallets and other wallets as well.

Steps To Reproduce

Can you please let us know how to reuse same provider for injected wallets and other ones.
Like I am using the following structure in my Application:-
-Firstly I've a connectWallet file where I've initialized wallet connectivity.
-second file is where I've instance setup.
-third one is where I've defined send METHODS
Now whenever I'll make any transaction using the same provider that I had initalized while invoking the Onboard.connect() method,it is working fine with injected wallets but facing issue with wallet connect(not injected).

What package is effected by this issue?

@web3-onboard/core

Is this a build or a runtime issue?

Runtime

Package Version

"^2.8.11",

Node Version

v18.17.1

What browsers are you seeing the problem on?

Chrome

Relevant log output

send method does not exist on provider

Anything else?

No response

Sanity Check

  • If this is a build issue, I have included my build config. If this is a runtime issue, I have included reproduction steps and/or a Minimal, Reproducible Example.
@taylorjdawson
Copy link
Contributor

Hey @khushnood1037 👋 So I think the issue is in that you are trying to use the deprecated send method. Web3onboard returns an EIP-1193 compliant provider, therefore when calling methods on the provider make sure it conforms to that standard. In this case you want to use the window.ethereum.request method. Let me know if that helps!

@Adamj1232
Copy link
Member

@khushnood1037 friendly ping to see if the above comment helped resolve your problem 😄

@Adamj1232
Copy link
Member

@khushnood1037 wanted to check with you one last time before closing this issue if this is still causing problems on your end 😄

@Adamj1232
Copy link
Member

@khushnood1037 we are going to close this for now as it has become stale and has a proposed fix above. Please feel free to continue the conversation should the issue persist. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants