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

Correctly represent connectivity #61

Closed
Gudahtt opened this issue Jun 30, 2020 · 0 comments · Fixed by #120
Closed

Correctly represent connectivity #61

Gudahtt opened this issue Jun 30, 2020 · 0 comments · Fixed by #120

Comments

@Gudahtt
Copy link
Member

Gudahtt commented Jun 30, 2020

According to EIP-1193 (permalink), the provider is "connected" when it can "service RPC requests to at least one chain". Currently the inpage provider doesn't make much of an attempt to guarantee this. Instead, 'connectivity' effectively represents whether or not the stream between the provider and MetaMask is active.

Certainly if the provider can't communicate with MetaMask, it can't service RPC requests either. But there remain many cases when the stream is live and the provider is "connected" but servicing RPC requests is impossible (e.g. when MetaMask is in the process of connecting to a network).

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

Successfully merging a pull request may close this issue.

1 participant