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

Replace global.ethereumProvider with EIP-1193-compatible provider #28774

Open
1 of 9 tasks
Gudahtt opened this issue Nov 27, 2024 · 0 comments
Open
1 of 9 tasks

Replace global.ethereumProvider with EIP-1193-compatible provider #28774

Gudahtt opened this issue Nov 27, 2024 · 0 comments

Comments

@Gudahtt
Copy link
Member

Gudahtt commented Nov 27, 2024

What is this about?

We use global.ethereumProvider in various places in the UI as an Ethereum provider, but it doesn't support EIP-1193 (it is missing events and the request method). We should replace the existing legacy provider with one that is compatible with EIP-1193.

This would eliminate some risk of regressions, and would eliminate a potential blocker to future work (i.e. tech debt). We already pass this provider into libraries expecting it to be EIP-1193 compliant, so this could result in future bugs (or might already be resulting in bugs we don't know about). This is also a blocker for certain dependency updates (e.g. @metamask/eth-token-tracker@10).

Scenario

No response

Design

No response

Technical Details

global.ethereumProvider is built with the package web3-stream-provider. We could update that library to support EIP-1193.

Though, we already have another EIP-1193 provider that uses streams: StreamProvider from @metamask/providers. It may be easier to use that instead, and drop web3-stream-provider.

Threat Modeling Framework

No response

Acceptance Criteria

  • global.ethereumProvider is compatible with EIP-1193, or has been removed completely

Stakeholder review needed before the work gets merged

  • Engineering (needed in most cases)
  • Design
  • Product
  • QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
  • Security
  • Legal
  • Marketing
  • Management (please specify)
  • Other (please specify)

References

No response

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

No branches or pull requests

1 participant