diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-05-30 20:55:43 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-05-30 20:55:43 +0800 |
commit | 3e65ac018c145d9fb49ece6cb113ae577f84323b (patch) | |
tree | 49f3b63f898b78c2b210b56b01e96f62887161b0 /test/utils | |
parent | dfcf49464b1a93b6e5df39289e9d14b2e60e62d2 (diff) | |
parent | 6b321ca1c70b9dcf188b2a112015386cba0ad5f2 (diff) | |
download | dexon-0x-contracts-3e65ac018c145d9fb49ece6cb113ae577f84323b.tar dexon-0x-contracts-3e65ac018c145d9fb49ece6cb113ae577f84323b.tar.gz dexon-0x-contracts-3e65ac018c145d9fb49ece6cb113ae577f84323b.tar.bz2 dexon-0x-contracts-3e65ac018c145d9fb49ece6cb113ae577f84323b.tar.lz dexon-0x-contracts-3e65ac018c145d9fb49ece6cb113ae577f84323b.tar.xz dexon-0x-contracts-3e65ac018c145d9fb49ece6cb113ae577f84323b.tar.zst dexon-0x-contracts-3e65ac018c145d9fb49ece6cb113ae577f84323b.zip |
Merge branch 'master' into fillOrderAsync
Diffstat (limited to 'test/utils')
-rw-r--r-- | test/utils/web3_factory.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/utils/web3_factory.ts b/test/utils/web3_factory.ts index 493fbc2df..ffdc0e4cf 100644 --- a/test/utils/web3_factory.ts +++ b/test/utils/web3_factory.ts @@ -10,14 +10,18 @@ import {constants} from './constants'; export const web3Factory = { create(): Web3 { + const provider = this.getRpcProvider(); + const web3 = new Web3(); + web3.setProvider(provider); + return web3; + }, + getRpcProvider(): Web3.Provider { const provider = new ProviderEngine(); const rpcUrl = `http://${constants.RPC_HOST}:${constants.RPC_PORT}`; provider.addProvider(new RpcSubprovider({ rpcUrl, })); provider.start(); - const web3 = new Web3(); - web3.setProvider(provider); - return web3; + return provider; }, }; |