aboutsummaryrefslogtreecommitdiffstats
path: root/src/0x.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-09-19 20:43:14 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-09-19 20:43:14 +0800
commit5e40f769969a67ab06e78b98a933413102529a41 (patch)
tree8e3e45aa6cb9664d33a938feef7d1302fe9ad635 /src/0x.ts
parent903e2f4f8a1de54bae3863ecbfab1855a2edc55f (diff)
downloaddexon-sol-tools-5e40f769969a67ab06e78b98a933413102529a41.tar
dexon-sol-tools-5e40f769969a67ab06e78b98a933413102529a41.tar.gz
dexon-sol-tools-5e40f769969a67ab06e78b98a933413102529a41.tar.bz2
dexon-sol-tools-5e40f769969a67ab06e78b98a933413102529a41.tar.lz
dexon-sol-tools-5e40f769969a67ab06e78b98a933413102529a41.tar.xz
dexon-sol-tools-5e40f769969a67ab06e78b98a933413102529a41.tar.zst
dexon-sol-tools-5e40f769969a67ab06e78b98a933413102529a41.zip
Postfix variable names with 'ifExists'
Diffstat (limited to 'src/0x.ts')
-rw-r--r--src/0x.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/0x.ts b/src/0x.ts
index ce2738a20..62ac7b212 100644
--- a/src/0x.ts
+++ b/src/0x.ts
@@ -202,16 +202,18 @@ export class ZeroEx {
this._web3Wrapper,
this._getTokenTransferProxyAddressAsync.bind(this),
);
- const exchangeContractAddress = _.isUndefined(config) ? undefined : config.exchangeContractAddress;
- this.exchange = new ExchangeWrapper(this._web3Wrapper, this.token, exchangeContractAddress);
+ const exchageContractAddressIfExists = _.isUndefined(config) ? undefined : config.exchangeContractAddress;
+ this.exchange = new ExchangeWrapper(this._web3Wrapper, this.token, exchageContractAddressIfExists);
this.proxy = new TokenTransferProxyWrapper(
this._web3Wrapper,
this._getTokenTransferProxyAddressAsync.bind(this),
);
- const tokenRegistryContractAddress = _.isUndefined(config) ? undefined : config.tokenRegistryContractAddress;
- this.tokenRegistry = new TokenRegistryWrapper(this._web3Wrapper, tokenRegistryContractAddress);
- const etherTokenContractAddress = _.isUndefined(config) ? undefined : config.etherTokenContractAddress;
- this.etherToken = new EtherTokenWrapper(this._web3Wrapper, this.token, etherTokenContractAddress);
+ const tokenRegistryContractAddressIfExists = _.isUndefined(config) ?
+ undefined :
+ config.tokenRegistryContractAddress;
+ this.tokenRegistry = new TokenRegistryWrapper(this._web3Wrapper, tokenRegistryContractAddressIfExists);
+ const etherTokenContractAddressIfExists = _.isUndefined(config) ? undefined : config.etherTokenContractAddress;
+ this.etherToken = new EtherTokenWrapper(this._web3Wrapper, this.token, etherTokenContractAddressIfExists);
}
/**
* Sets a new web3 provider for 0x.js. Updating the provider will stop all