Make web3Wrapper protected instead of public

This commit is contained in:
Fabio Berger 2017-06-08 12:06:04 +02:00
parent 00782d6d68
commit 196130ff96
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import {ZeroExError} from '../types';
import {utils} from '../utils/utils'; import {utils} from '../utils/utils';
export class ContractWrapper { export class ContractWrapper {
public web3Wrapper: Web3Wrapper; protected web3Wrapper: Web3Wrapper;
constructor(web3Wrapper: Web3Wrapper) { constructor(web3Wrapper: Web3Wrapper) {
this.web3Wrapper = web3Wrapper; this.web3Wrapper = web3Wrapper;
} }

View File

@ -35,9 +35,9 @@ describe('ZeroEx library', () => {
// Check that all nested web3 instances return the updated provider // Check that all nested web3 instances return the updated provider
const nestedWeb3WrapperProvider = (zeroEx as any).web3Wrapper.getCurrentProvider(); const nestedWeb3WrapperProvider = (zeroEx as any).web3Wrapper.getCurrentProvider();
expect((nestedWeb3WrapperProvider as any).zeroExTestId).to.be.a('number'); expect((nestedWeb3WrapperProvider as any).zeroExTestId).to.be.a('number');
const exchangeWeb3WrapperProvider = zeroEx.exchange.web3Wrapper.getCurrentProvider(); const exchangeWeb3WrapperProvider = (zeroEx.exchange as any).web3Wrapper.getCurrentProvider();
expect((exchangeWeb3WrapperProvider as any).zeroExTestId).to.be.a('number'); expect((exchangeWeb3WrapperProvider as any).zeroExTestId).to.be.a('number');
const tokenRegistryWeb3WrapperProvider = zeroEx.tokenRegistry.web3Wrapper.getCurrentProvider(); const tokenRegistryWeb3WrapperProvider = (zeroEx.tokenRegistry as any).web3Wrapper.getCurrentProvider();
expect((tokenRegistryWeb3WrapperProvider as any).zeroExTestId).to.be.a('number'); expect((tokenRegistryWeb3WrapperProvider as any).zeroExTestId).to.be.a('number');
}); });
}); });