aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHsuan Lee <boczeratul@gmail.com>2019-03-06 16:40:51 +0800
committerHsuan Lee <boczeratul@gmail.com>2019-03-06 16:40:51 +0800
commitae899a86dbf21829c87f3cff0a34161181b09133 (patch)
tree07f9241f020e85e83a238bb33ba5f2c839b47cb8
parent2efe266d46f3577ebdb4df3bb8876dd49ec9f427 (diff)
downloaddexon-sol-tools-ae899a86dbf21829c87f3cff0a34161181b09133.tar
dexon-sol-tools-ae899a86dbf21829c87f3cff0a34161181b09133.tar.gz
dexon-sol-tools-ae899a86dbf21829c87f3cff0a34161181b09133.tar.bz2
dexon-sol-tools-ae899a86dbf21829c87f3cff0a34161181b09133.tar.lz
dexon-sol-tools-ae899a86dbf21829c87f3cff0a34161181b09133.tar.xz
dexon-sol-tools-ae899a86dbf21829c87f3cff0a34161181b09133.tar.zst
dexon-sol-tools-ae899a86dbf21829c87f3cff0a34161181b09133.zip
Update provider type
-rw-r--r--packages/sol-tracing-utils/src/trace_collection_subprovider.ts6
-rw-r--r--packages/subproviders/package.json1
-rw-r--r--packages/subproviders/src/subproviders/subprovider.ts7
-rw-r--r--tsconfig.json6
4 files changed, 12 insertions, 8 deletions
diff --git a/packages/sol-tracing-utils/src/trace_collection_subprovider.ts b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
index a2e5abd09..140f04b4a 100644
--- a/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
+++ b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
@@ -1,8 +1,8 @@
import { BlockchainLifecycle } from '@0x/dev-utils';
-import { Callback, ErrorCallback, NextCallback, Subprovider } from '@dexon-foundation/subproviders';
+import { Callback, ErrorCallback, NextCallback, Subprovider, Web3ProviderEngine } from '@dexon-foundation/subproviders';
import { logUtils } from '@0x/utils';
import { CallDataRPC, marshaller, Web3Wrapper } from '@0x/web3-wrapper';
-import { JSONRPCRequestPayload, Provider, TxData } from 'ethereum-types';
+import { JSONRPCRequestPayload, TxData } from 'ethereum-types';
import * as _ from 'lodash';
import { Lock } from 'semaphore-async-await';
@@ -129,7 +129,7 @@ export abstract class TraceCollectionSubprovider extends Subprovider {
* directly.
* @param engine The ProviderEngine this subprovider is added to
*/
- public setEngine(engine: Provider): void {
+ public setEngine(engine: Web3ProviderEngine): void {
super.setEngine(engine);
this._web3Wrapper = new Web3Wrapper(engine);
}
diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json
index 3826496c7..3efd920d2 100644
--- a/packages/subproviders/package.json
+++ b/packages/subproviders/package.json
@@ -40,7 +40,6 @@
"@ledgerhq/hw-transport-u2f": "4.24.0",
"@types/eth-lightwallet": "^3.0.0",
"@types/hdkey": "^0.7.0",
- "@types/web3-provider-engine": "^14.0.0",
"bip39": "^2.5.0",
"bn.js": "^4.11.8",
"eth-lightwallet": "^3.0.1",
diff --git a/packages/subproviders/src/subproviders/subprovider.ts b/packages/subproviders/src/subproviders/subprovider.ts
index cd6780e0c..214375dfd 100644
--- a/packages/subproviders/src/subproviders/subprovider.ts
+++ b/packages/subproviders/src/subproviders/subprovider.ts
@@ -1,5 +1,6 @@
import { promisify } from '@0x/utils';
-import { JSONRPCRequestPayload, JSONRPCResponsePayload, Provider } from 'ethereum-types';
+import { JSONRPCRequestPayload, JSONRPCResponsePayload } from 'ethereum-types';
+import Web3ProviderEngine = require('@dexon-foundation/web3-provider-engine');
import { Callback, ErrorCallback, JSONRPCRequestPayloadWithMethod } from '../types';
/**
@@ -8,7 +9,7 @@ import { Callback, ErrorCallback, JSONRPCRequestPayloadWithMethod } from '../typ
*/
export abstract class Subprovider {
// tslint:disable-next-line:underscore-private-and-protected
- private engine!: Provider;
+ private engine!: Web3ProviderEngine;
protected static _createFinalPayload(
payload: Partial<JSONRPCRequestPayloadWithMethod>,
): Partial<JSONRPCRequestPayloadWithMethod> {
@@ -64,7 +65,7 @@ export abstract class Subprovider {
* directly.
* @param engine The ProviderEngine this subprovider is added to
*/
- public setEngine(engine: Provider): void {
+ public setEngine(engine: Web3ProviderEngine): void {
this.engine = engine;
}
}
diff --git a/tsconfig.json b/tsconfig.json
index fe4f2c902..f2d1c7189 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -8,7 +8,11 @@
"noImplicitReturns": true,
"pretty": true,
"skipLibCheck": true,
- "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@dexon-foundation/typescript-typings/types", "node_modules/@types"],
+ "typeRoots": [
+ "node_modules/@0x/typescript-typings/types",
+ "node_modules/@dexon-foundation/typescript-typings/types",
+ "node_modules/@types"
+ ],
"strict": true,
// These settings are required for TypeScript project references
"composite": true,