aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'packages/migrations/src/utils')
-rw-r--r--packages/migrations/src/utils/constants.ts1
-rw-r--r--packages/migrations/src/utils/provider_factory.ts15
2 files changed, 7 insertions, 9 deletions
diff --git a/packages/migrations/src/utils/constants.ts b/packages/migrations/src/utils/constants.ts
index 21887ab16..068122e28 100644
--- a/packages/migrations/src/utils/constants.ts
+++ b/packages/migrations/src/utils/constants.ts
@@ -12,4 +12,5 @@ export const constants = {
ERC721_PROXY_ID: '0x08e937fa',
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
RPC_URL: 'http://localhost:8545',
+ KOVAN_NETWORK_ID: 42,
};
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;
},