Skip to content

How to set timeout on Web3Provider? #2349

Answered by ricmoo
miguelmota asked this question in Q&A
Discussion options

You must be logged in to vote

You cannot set a timeout on a Web3Provider, because there is not necessarily an underlying network connection. For example, MetaMask is not something that can timeout, since it is an injected object.

If you want a timeout, you will need to set it on any underlying EIP-1193 or Web3-based provider using its API.

Does that make sense?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@miguelmota
Comment options

Answer selected by miguelmota
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2308 on November 30, 2021 14:49.