Replace global.ethereumProvider
with EIP-1193-compatible provider
#28774
Labels
global.ethereumProvider
with EIP-1193-compatible provider
#28774
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 therequest
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 packageweb3-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 dropweb3-stream-provider
.Threat Modeling Framework
No response
Acceptance Criteria
global.ethereumProvider
is compatible with EIP-1193, or has been removed completelyStakeholder review needed before the work gets merged
References
No response
The text was updated successfully, but these errors were encountered: