diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-06-28 07:47:31 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-06-30 08:25:56 +0800 |
commit | d3293a5571b64a2d807f9e71ff87497287e951e0 (patch) | |
tree | 634f86c16b812338f56d666df95a29d363eeb87d /packages/migrations/src/utils/provider_factory.ts | |
parent | 854752acdf8538879c67c8bf5646c3660a49c2e0 (diff) | |
download | dexon-0x-contracts-d3293a5571b64a2d807f9e71ff87497287e951e0.tar dexon-0x-contracts-d3293a5571b64a2d807f9e71ff87497287e951e0.tar.gz dexon-0x-contracts-d3293a5571b64a2d807f9e71ff87497287e951e0.tar.bz2 dexon-0x-contracts-d3293a5571b64a2d807f9e71ff87497287e951e0.tar.lz dexon-0x-contracts-d3293a5571b64a2d807f9e71ff87497287e951e0.tar.xz dexon-0x-contracts-d3293a5571b64a2d807f9e71ff87497287e951e0.tar.zst dexon-0x-contracts-d3293a5571b64a2d807f9e71ff87497287e951e0.zip |
Fix migrations
Diffstat (limited to 'packages/migrations/src/utils/provider_factory.ts')
-rw-r--r-- | packages/migrations/src/utils/provider_factory.ts | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/packages/migrations/src/utils/provider_factory.ts b/packages/migrations/src/utils/provider_factory.ts index 14b1be982..6ae2ad41c 100644 --- a/packages/migrations/src/utils/provider_factory.ts +++ b/packages/migrations/src/utils/provider_factory.ts @@ -1,5 +1,4 @@ import { LedgerSubprovider } from '@0xproject/subproviders'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; import Eth from '@ledgerhq/hw-app-eth'; import TransportNodeHid from '@ledgerhq/hw-transport-node-hid'; import { Provider } from 'ethereum-types'; @@ -18,19 +17,17 @@ async function ledgerEthereumNodeJsClientFactoryAsync(): Promise<LedgerEthereumC export const providerFactory = { async getLedgerProviderAsync(): Promise<Provider> { const provider = new ProviderEngine(); - provider.addProvider( - new RpcSubprovider({ - rpcUrl: constants.RPC_URL, - }), - ); - const web3Wrapper = new Web3Wrapper(provider); - const networkId = await web3Wrapper.getNetworkIdAsync(); const ledgerWalletConfigs = { - networkId, + networkId: constants.KOVAN_NETWORK_ID, ledgerEthereumClientFactoryAsync: ledgerEthereumNodeJsClientFactoryAsync, }; const ledgerSubprovider = new LedgerSubprovider(ledgerWalletConfigs); provider.addProvider(ledgerSubprovider); + provider.addProvider( + new RpcSubprovider({ + rpcUrl: constants.RPC_URL, + }), + ); provider.start(); return provider; }, |