diff options
Diffstat (limited to 'packages/0x.js/test/ether_token_wrapper_test.ts')
-rw-r--r-- | packages/0x.js/test/ether_token_wrapper_test.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/0x.js/test/ether_token_wrapper_test.ts b/packages/0x.js/test/ether_token_wrapper_test.ts index 644101dc7..99c42fe0b 100644 --- a/packages/0x.js/test/ether_token_wrapper_test.ts +++ b/packages/0x.js/test/ether_token_wrapper_test.ts @@ -3,7 +3,6 @@ import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; import 'mocha'; -import * as Web3 from 'web3'; import { ApprovalContractEventArgs, @@ -24,7 +23,7 @@ import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; import { reportNodeCallbackErrors } from './utils/report_callback_errors'; import { TokenUtils } from './utils/token_utils'; -import { web3, web3Wrapper } from './utils/web3_wrapper'; +import { provider, web3Wrapper } from './utils/web3_wrapper'; chaiSetup.configure(); const expect = chai.expect; @@ -55,7 +54,7 @@ describe('EtherTokenWrapper', () => { const depositAmount = new BigNumber(42); const withdrawalAmount = new BigNumber(42); before(async () => { - zeroEx = new ZeroEx(web3.currentProvider, zeroExConfig); + zeroEx = new ZeroEx(provider, zeroExConfig); tokens = await zeroEx.tokenRegistry.getTokensAsync(); userAddresses = await zeroEx.getAvailableAddressesAsync(); addressWithETH = userAddresses[0]; @@ -79,7 +78,7 @@ describe('EtherTokenWrapper', () => { const UNKNOWN_NETWORK_NETWORK_ID = 10; expect( () => - new ZeroEx(web3.currentProvider, { + new ZeroEx(provider, { networkId: UNKNOWN_NETWORK_NETWORK_ID, } as any), ).to.throw(); @@ -261,8 +260,7 @@ describe('EtherTokenWrapper', () => { callbackNeverToBeCalled, ); const callbackToBeCalled = reportNodeCallbackErrors(done)(); - const newProvider = web3Factory.getRpcProvider(); - zeroEx.setProvider(newProvider, constants.TESTRPC_NETWORK_ID); + zeroEx.setProvider(provider, constants.TESTRPC_NETWORK_ID); await zeroEx.etherToken.depositAsync(etherTokenAddress, transferAmount, addressWithETH); zeroEx.etherToken.subscribe( etherTokenAddress, |