Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align types with @metamask/eth-json-rpc-provider (#21)
Currently, passing an instance of SafeEventEmitterProvider to the EthQuery constructor produces a type error. This is happening because the `Provider` type that this package defines allows the `params` property of the JSON-RPC request object to be anything, whereas in the SafeEventEmitterProvider interface, it has to be JSON-compatible. In other words, the provider that this package expects isn't compliant with a "proper" provider. To fix this, this commit manually copies the `Json` and `JsonRpcParams` types from `@metamask/utils` to avoid a direct dependency. This is a temporary solution to prevent this type error from spreading within the `core` codebase. We will investigate a more overarching solution later.
- Loading branch information