aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/0x.js/test/0x.js_test.ts5
-rw-r--r--packages/0x.js/test/ether_token_wrapper_test.ts3
-rw-r--r--packages/0x.js/test/exchange_wrapper_test.ts3
-rw-r--r--packages/0x.js/test/token_wrapper_test.ts3
-rw-r--r--packages/contracts/test/utils/web3_wrapper.ts2
5 files changed, 6 insertions, 10 deletions
diff --git a/packages/0x.js/test/0x.js_test.ts b/packages/0x.js/test/0x.js_test.ts
index 5720f42ce..de5a6be58 100644
--- a/packages/0x.js/test/0x.js_test.ts
+++ b/packages/0x.js/test/0x.js_test.ts
@@ -42,10 +42,9 @@ describe('ZeroEx library', () => {
expect((zeroEx.exchange as any)._exchangeContractIfExists).to.not.be.undefined();
expect((zeroEx.tokenRegistry as any)._tokenRegistryContractIfExists).to.not.be.undefined();
- const newProvider = provider;
// Add property to newProvider so that we can differentiate it from old provider
- (newProvider as any).zeroExTestId = 1;
- zeroEx.setProvider(newProvider, constants.TESTRPC_NETWORK_ID);
+ (provider as any).zeroExTestId = 1;
+ zeroEx.setProvider(provider, constants.TESTRPC_NETWORK_ID);
// Check that contractInstances with old provider are removed after provider update
expect((zeroEx.exchange as any)._exchangeContractIfExists).to.be.undefined();
diff --git a/packages/0x.js/test/ether_token_wrapper_test.ts b/packages/0x.js/test/ether_token_wrapper_test.ts
index e1ae34edb..99c42fe0b 100644
--- a/packages/0x.js/test/ether_token_wrapper_test.ts
+++ b/packages/0x.js/test/ether_token_wrapper_test.ts
@@ -260,8 +260,7 @@ describe('EtherTokenWrapper', () => {
callbackNeverToBeCalled,
);
const callbackToBeCalled = reportNodeCallbackErrors(done)();
- const newProvider = provider;
- 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,
diff --git a/packages/0x.js/test/exchange_wrapper_test.ts b/packages/0x.js/test/exchange_wrapper_test.ts
index addfa6f91..cd74af5a1 100644
--- a/packages/0x.js/test/exchange_wrapper_test.ts
+++ b/packages/0x.js/test/exchange_wrapper_test.ts
@@ -976,8 +976,7 @@ describe('ExchangeWrapper', () => {
);
zeroEx.exchange.subscribe(ExchangeEvents.LogFill, indexFilterValues, callbackNeverToBeCalled);
- const newProvider = provider;
- zeroEx.setProvider(newProvider, constants.TESTRPC_NETWORK_ID);
+ zeroEx.setProvider(provider, constants.TESTRPC_NETWORK_ID);
const callback = reportNodeCallbackErrors(done)(
(logEvent: DecodedLogEvent<LogFillContractEventArgs>) => {
diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts
index 63f17acf7..5a8e6d16f 100644
--- a/packages/0x.js/test/token_wrapper_test.ts
+++ b/packages/0x.js/test/token_wrapper_test.ts
@@ -425,8 +425,7 @@ describe('TokenWrapper', () => {
);
zeroEx.token.subscribe(tokenAddress, TokenEvents.Transfer, indexFilterValues, callbackNeverToBeCalled);
const callbackToBeCalled = reportNodeCallbackErrors(done)();
- const newProvider = provider;
- zeroEx.setProvider(newProvider, constants.TESTRPC_NETWORK_ID);
+ zeroEx.setProvider(provider, constants.TESTRPC_NETWORK_ID);
zeroEx.token.subscribe(tokenAddress, TokenEvents.Transfer, indexFilterValues, callbackToBeCalled);
await zeroEx.token.transferAsync(tokenAddress, coinbase, addressWithoutFunds, transferAmount);
})().catch(done);
diff --git a/packages/contracts/test/utils/web3_wrapper.ts b/packages/contracts/test/utils/web3_wrapper.ts
index bc4e1cfd8..dd6f198c4 100644
--- a/packages/contracts/test/utils/web3_wrapper.ts
+++ b/packages/contracts/test/utils/web3_wrapper.ts
@@ -4,5 +4,5 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper';
const providerConfigs = { shouldUseInProcessGanache: true };
export const web3 = web3Factory.create(providerConfigs);
-export const provider: Provider = web3.currentProvider;
+export const provider = web3.currentProvider;
export const web3Wrapper = new Web3Wrapper(provider);