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

Get provider with Ethers.js / Ethereum > React | Error : unsupported provider (argument="provider", value={}, code=INVALID_ARGUMENT, version=providers/5.6.0) #443

Open
Dansando8 opened this issue Aug 19, 2022 Discussed in #440 · 0 comments

Comments

@Dansando8
Copy link

Discussed in https://github.com/orgs/Web3Auth/discussions/440

Originally posted by Dansando8 August 19, 2022
Hello there 🙂

If somebody had the same problem and may share some light it would be nice, thx!

When initializing web3auth, I did this as it's displayed on the documentation:

const web3authProvider = web3auth.connect();

const provider = new ethers.providers.Web3Provider(web3authProvider);

Then I get this error in the console:

Error: unsupported provider (argument="provider", value={}, code=INVALID_ARGUMENT, version=providers/5.6.0)

There is also a TypeScript error concerning the argument 'web3authProvider':

Argument of type 'Promise<SafeEventEmitterProvider | null>' is not assignable to parameter of type 'ExternalProvider | JsonRpcFetchFunc'.

Somebody managed to fix it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant