diff options
Diffstat (limited to 'packages/testnet-faucets')
-rw-r--r-- | packages/testnet-faucets/package.json | 5 | ||||
-rw-r--r-- | packages/testnet-faucets/src/ts/handler.ts | 17 |
2 files changed, 10 insertions, 12 deletions
diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json index 72ab8f61b..442f488c9 100644 --- a/packages/testnet-faucets/package.json +++ b/packages/testnet-faucets/package.json @@ -18,7 +18,7 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "0x.js": "^0.38.0", + "0x.js": "0.38.4", "@0xproject/subproviders": "^0.10.5", "@0xproject/web3-wrapper": "^0.7.2", "@0xproject/typescript-typings": "^0.4.2", @@ -28,8 +28,7 @@ "ethereumjs-util": "^5.1.1", "express": "^4.15.2", "lodash": "^4.17.4", - "rollbar": "^0.6.5", - "web3-provider-engine": "14.0.6" + "rollbar": "^0.6.5" }, "devDependencies": { "@0xproject/tslint-config": "^0.4.21", diff --git a/packages/testnet-faucets/src/ts/handler.ts b/packages/testnet-faucets/src/ts/handler.ts index 6d26691d6..0f61159fa 100644 --- a/packages/testnet-faucets/src/ts/handler.ts +++ b/packages/testnet-faucets/src/ts/handler.ts @@ -5,9 +5,12 @@ import { Provider } from 'ethereum-types'; import * as express from 'express'; import * as _ from 'lodash'; -import { NonceTrackerSubprovider, PrivateKeyWalletSubprovider } from '@0xproject/subproviders'; -import ProviderEngine = require('web3-provider-engine'); -import RpcSubprovider = require('web3-provider-engine/subproviders/rpc'); +import { + NonceTrackerSubprovider, + PrivateKeyWalletSubprovider, + RPCSubprovider, + Web3ProviderEngine, +} from '@0xproject/subproviders'; import { configs } from './configs'; import { constants } from './constants'; @@ -39,14 +42,10 @@ export class Handler { if (_.isUndefined(configs.DISPENSER_PRIVATE_KEY)) { throw new Error('Dispenser Private key not found'); } - const engine = new ProviderEngine(); + const engine = new Web3ProviderEngine(); engine.addProvider(new NonceTrackerSubprovider()); engine.addProvider(new PrivateKeyWalletSubprovider(configs.DISPENSER_PRIVATE_KEY)); - engine.addProvider( - new RpcSubprovider({ - rpcUrl, - }), - ); + engine.addProvider(new RPCSubprovider(rpcUrl)); engine.start(); return engine; } |