aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders
diff options
context:
space:
mode:
Diffstat (limited to 'packages/subproviders')
-rw-r--r--packages/subproviders/CHANGELOG.json9
-rw-r--r--packages/subproviders/src/subproviders/subprovider.ts6
2 files changed, 12 insertions, 3 deletions
diff --git a/packages/subproviders/CHANGELOG.json b/packages/subproviders/CHANGELOG.json
index d3bf79ac4..d7fe5e330 100644
--- a/packages/subproviders/CHANGELOG.json
+++ b/packages/subproviders/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "0.10.3",
+ "changes": [
+ {
+ "note": "Define engine type as Provider in setEngine",
+ "pr": 675
+ }
+ ]
+ },
+ {
"timestamp": 1527009133,
"version": "0.10.2",
"changes": [
diff --git a/packages/subproviders/src/subproviders/subprovider.ts b/packages/subproviders/src/subproviders/subprovider.ts
index 329bf7d9c..ff8378c4e 100644
--- a/packages/subproviders/src/subproviders/subprovider.ts
+++ b/packages/subproviders/src/subproviders/subprovider.ts
@@ -1,5 +1,5 @@
import { promisify } from '@0xproject/utils';
-import { JSONRPCRequestPayload, JSONRPCResponsePayload } from 'ethereum-types';
+import { JSONRPCRequestPayload, JSONRPCResponsePayload, Provider } from 'ethereum-types';
import { Callback, ErrorCallback, JSONRPCRequestPayloadWithMethod } from '../types';
/**
@@ -8,7 +8,7 @@ import { Callback, ErrorCallback, JSONRPCRequestPayloadWithMethod } from '../typ
*/
export abstract class Subprovider {
// tslint:disable-next-line:underscore-private-and-protected
- private engine: any;
+ private engine!: Provider;
// Ported from: https://github.com/MetaMask/provider-engine/blob/master/util/random-id.js
private static _getRandomId(): number {
const extraDigits = 3;
@@ -56,7 +56,7 @@ export abstract class Subprovider {
* This is only called within the ProviderEngine source code, do not call
* directly.
*/
- public setEngine(engine: any): void {
+ public setEngine(engine: Provider): void {
this.engine = engine;
}
}