diff options
author | Fabio Berger <me@fabioberger.com> | 2018-07-13 20:26:02 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-07-13 20:26:02 +0800 |
commit | 512502ca0873a290accb53777ca9d93f8d28e84b (patch) | |
tree | 51dba0dbfd00021a8e84f040900283337010652b /packages/subproviders | |
parent | 6ce662c7a4d04540920bc2a11a376c71bc051bb0 (diff) | |
download | dexon-0x-contracts-512502ca0873a290accb53777ca9d93f8d28e84b.tar.gz dexon-0x-contracts-512502ca0873a290accb53777ca9d93f8d28e84b.tar.zst dexon-0x-contracts-512502ca0873a290accb53777ca9d93f8d28e84b.zip |
Export Web3ProviderEngine from subproviders package
Diffstat (limited to 'packages/subproviders')
9 files changed, 10 insertions, 16 deletions
diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts index 9a5597a06..9d4480e59 100644 --- a/packages/subproviders/src/index.ts +++ b/packages/subproviders/src/index.ts @@ -1,5 +1,6 @@ import Eth from '@ledgerhq/hw-app-eth'; import TransportU2F from '@ledgerhq/hw-transport-u2f'; +export import Web3ProviderEngine = require('web3-provider-engine'); export { ECSignature } from '@0xproject/types'; import { LedgerEthereumClient } from './types'; diff --git a/packages/subproviders/src/utils/subprovider_utils.ts b/packages/subproviders/src/utils/subprovider_utils.ts index 24ebedd06..beda408ab 100644 --- a/packages/subproviders/src/utils/subprovider_utils.ts +++ b/packages/subproviders/src/utils/subprovider_utils.ts @@ -1,4 +1,4 @@ -import ProviderEngine = require('web3-provider-engine'); +import Web3ProviderEngine = require('web3-provider-engine'); import { Subprovider } from '../subproviders/subprovider'; @@ -7,7 +7,7 @@ import { Subprovider } from '../subproviders/subprovider'; * @param provider Given provider * @param subprovider Subprovider to prepend */ -export function prependSubprovider(provider: ProviderEngine, subprovider: Subprovider): void { +export function prependSubprovider(provider: Web3ProviderEngine, subprovider: Subprovider): void { subprovider.setEngine(provider); // HACK: We use implementation details of provider engine here // https://github.com/MetaMask/provider-engine/blob/master/index.js#L68 diff --git a/packages/subproviders/test/integration/ledger_subprovider_test.ts b/packages/subproviders/test/integration/ledger_subprovider_test.ts index e5233fdbc..103e8f952 100644 --- a/packages/subproviders/test/integration/ledger_subprovider_test.ts +++ b/packages/subproviders/test/integration/ledger_subprovider_test.ts @@ -7,9 +7,8 @@ import TransportNodeHid from '@ledgerhq/hw-transport-node-hid'; import * as chai from 'chai'; import { JSONRPCResponsePayload } from 'ethereum-types'; import * as ethUtils from 'ethereumjs-util'; -import Web3ProviderEngine = require('web3-provider-engine'); -import { LedgerSubprovider, RPCSubprovider } from '../../src'; +import { LedgerSubprovider, RPCSubprovider, Web3ProviderEngine } from '../../src'; import { LedgerEthereumClient } from '../../src/types'; import { chaiSetup } from '../chai_setup'; import { fixtureData } from '../utils/fixture_data'; diff --git a/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts b/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts index f17c21f02..063817a95 100644 --- a/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts +++ b/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts @@ -2,9 +2,8 @@ import * as chai from 'chai'; import * as lightwallet from 'eth-lightwallet'; import { JSONRPCResponsePayload } from 'ethereum-types'; import * as ethUtils from 'ethereumjs-util'; -import Web3ProviderEngine = require('web3-provider-engine'); -import { EthLightwalletSubprovider } from '../../src'; +import { EthLightwalletSubprovider, Web3ProviderEngine } from '../../src'; import { DoneCallback } from '../../src/types'; import { chaiSetup } from '../chai_setup'; import { fixtureData } from '../utils/fixture_data'; diff --git a/packages/subproviders/test/unit/ledger_subprovider_test.ts b/packages/subproviders/test/unit/ledger_subprovider_test.ts index 3b57e125b..edff5144e 100644 --- a/packages/subproviders/test/unit/ledger_subprovider_test.ts +++ b/packages/subproviders/test/unit/ledger_subprovider_test.ts @@ -2,9 +2,8 @@ import * as chai from 'chai'; import { JSONRPCResponsePayload } from 'ethereum-types'; import * as ethUtils from 'ethereumjs-util'; import * as _ from 'lodash'; -import Web3ProviderEngine = require('web3-provider-engine'); -import { LedgerSubprovider } from '../../src'; +import { LedgerSubprovider, Web3ProviderEngine } from '../../src'; import { DoneCallback, LedgerCommunicationClient, diff --git a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts index 51ba7094c..f2bdda3cd 100644 --- a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts +++ b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts @@ -1,9 +1,8 @@ import * as chai from 'chai'; import { JSONRPCResponsePayload } from 'ethereum-types'; import * as ethUtils from 'ethereumjs-util'; -import Web3ProviderEngine = require('web3-provider-engine'); -import { GanacheSubprovider, MnemonicWalletSubprovider } from '../../src/'; +import { GanacheSubprovider, MnemonicWalletSubprovider, Web3ProviderEngine } from '../../src/'; import { DoneCallback, WalletSubproviderErrors } from '../../src/types'; import { chaiSetup } from '../chai_setup'; import { fixtureData } from '../utils/fixture_data'; diff --git a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts index fa33cd50a..c437d0815 100644 --- a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts +++ b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts @@ -1,11 +1,10 @@ import * as chai from 'chai'; -import Web3ProviderEngine = require('web3-provider-engine'); import FixtureSubprovider = require('web3-provider-engine/subproviders/fixture'); import { promisify } from '@0xproject/utils'; import EthereumTx = require('ethereumjs-tx'); -import { NonceTrackerSubprovider } from '../../src'; +import { NonceTrackerSubprovider, Web3ProviderEngine } from '../../src'; import { chaiSetup } from '../chai_setup'; const expect = chai.expect; diff --git a/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts b/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts index ab321bcff..95773145f 100644 --- a/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts +++ b/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts @@ -1,9 +1,8 @@ import * as chai from 'chai'; import { JSONRPCResponsePayload } from 'ethereum-types'; import * as ethUtils from 'ethereumjs-util'; -import Web3ProviderEngine = require('web3-provider-engine'); -import { GanacheSubprovider, PrivateKeyWalletSubprovider } from '../../src/'; +import { GanacheSubprovider, PrivateKeyWalletSubprovider, Web3ProviderEngine } from '../../src/'; import { DoneCallback, WalletSubproviderErrors } from '../../src/types'; import { chaiSetup } from '../chai_setup'; import { fixtureData } from '../utils/fixture_data'; diff --git a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts index e3f204b15..e30d2f74e 100644 --- a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts +++ b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts @@ -2,9 +2,8 @@ import { DoneCallback } from '@0xproject/types'; import * as chai from 'chai'; import { JSONRPCResponsePayload } from 'ethereum-types'; import * as Sinon from 'sinon'; -import Web3ProviderEngine = require('web3-provider-engine'); -import { RedundantSubprovider, RPCSubprovider } from '../../src'; +import { RedundantSubprovider, RPCSubprovider, Web3ProviderEngine } from '../../src'; import { Subprovider } from '../../src/subproviders/subprovider'; import { chaiSetup } from '../chai_setup'; import { ganacheSubprovider } from '../utils/ganache_subprovider'; |