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/website/ts | |
parent | 6ce662c7a4d04540920bc2a11a376c71bc051bb0 (diff) | |
download | dexon-0x-contracts-512502ca0873a290accb53777ca9d93f8d28e84b.tar dexon-0x-contracts-512502ca0873a290accb53777ca9d93f8d28e84b.tar.gz dexon-0x-contracts-512502ca0873a290accb53777ca9d93f8d28e84b.tar.bz2 dexon-0x-contracts-512502ca0873a290accb53777ca9d93f8d28e84b.tar.lz dexon-0x-contracts-512502ca0873a290accb53777ca9d93f8d28e84b.tar.xz dexon-0x-contracts-512502ca0873a290accb53777ca9d93f8d28e84b.tar.zst dexon-0x-contracts-512502ca0873a290accb53777ca9d93f8d28e84b.zip |
Export Web3ProviderEngine from subproviders package
Diffstat (limited to 'packages/website/ts')
-rw-r--r-- | packages/website/ts/blockchain.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index 31d8ba2d6..099171c45 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -18,6 +18,7 @@ import { RPCSubprovider, SignerSubprovider, Subprovider, + Web3ProviderEngine, } from '@0xproject/subproviders'; import { BlockParam, @@ -61,7 +62,6 @@ import { configs } from 'ts/utils/configs'; import { constants } from 'ts/utils/constants'; import { errorReporter } from 'ts/utils/error_reporter'; import { utils } from 'ts/utils/utils'; -import ProviderEngine = require('web3-provider-engine'); import FilterSubprovider = require('web3-provider-engine/subproviders/filters'); import * as MintableArtifacts from '../contracts/Mintable.json'; @@ -148,7 +148,7 @@ export class Blockchain { if (!isU2FSupported) { throw new Error('Cannot update providerType to LEDGER without U2F support'); } - const provider = new ProviderEngine(); + const provider = new Web3ProviderEngine(); const ledgerWalletConfigs = { networkId: networkIdIfExists, ledgerEthereumClientFactoryAsync: ledgerEthereumBrowserClientFactoryAsync, @@ -165,7 +165,7 @@ export class Blockchain { } else if (doesInjectedWeb3Exist && isPublicNodeAvailableForNetworkId) { // We catch all requests involving a users account and send it to the injectedWeb3 // instance. All other requests go to the public hosted node. - const provider = new ProviderEngine(); + const provider = new Web3ProviderEngine(); provider.addProvider(new SignerSubprovider(injectedWeb3.currentProvider)); provider.addProvider(new FilterSubprovider()); const rpcSubproviders = _.map(publicNodeUrlsIfExistsForNetworkId, publicNodeUrl => { @@ -181,7 +181,7 @@ export class Blockchain { // If no injectedWeb3 instance, all requests fallback to our public hosted mainnet/testnet node // We do this so that users can still browse the 0x Portal DApp even if they do not have web3 // injected into their browser. - const provider = new ProviderEngine(); + const provider = new Web3ProviderEngine(); provider.addProvider(new FilterSubprovider()); const networkId = constants.NETWORK_ID_MAINNET; const rpcSubproviders = _.map(configs.PUBLIC_NODE_URLS_BY_NETWORK_ID[networkId], publicNodeUrl => { |