eth-json-rpc-middleware
eth-json-rpc-middleware copied to clipboard
Adapt to EIP-1193 provider changes
After SafeEventEmitterProvider is updated to support EIP-1193 and a new version of @metamask/eth-json-rpc-provider is released, we should adapt to the changes:
- We should bump
@metamask/eth-json-rpc-providerto rely on the new changes. - At that point, calling
sendAsyncwill be deprecated; we should userequestinstead.- There are two middleware which use
sendAsync:retryOnEmptyandblock-ref. - We also use
sendAsyncinproviderAsMiddleware. - Finally, there are a lot of tests that mock
sendAsyncon the provider. The tests use a helper,stubProviderRequestswhich does this in particular. These references need to be changed.
- There are two middleware which use