aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers/token_registry_wrapper.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-10 21:36:52 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-10 21:36:52 +0800
commitd727bed6ab6fef90717a45845c544b409657e3c2 (patch)
tree9a232b7764d80726acf5f4dd91d19c0c06ae0439 /src/contract_wrappers/token_registry_wrapper.ts
parent8b9d8ad1b625967fe264fe87e617af1089e1d0e9 (diff)
downloaddexon-0x-contracts-d727bed6ab6fef90717a45845c544b409657e3c2.tar
dexon-0x-contracts-d727bed6ab6fef90717a45845c544b409657e3c2.tar.gz
dexon-0x-contracts-d727bed6ab6fef90717a45845c544b409657e3c2.tar.bz2
dexon-0x-contracts-d727bed6ab6fef90717a45845c544b409657e3c2.tar.lz
dexon-0x-contracts-d727bed6ab6fef90717a45845c544b409657e3c2.tar.xz
dexon-0x-contracts-d727bed6ab6fef90717a45845c544b409657e3c2.tar.zst
dexon-0x-contracts-d727bed6ab6fef90717a45845c544b409657e3c2.zip
Prefix private vars with _
Diffstat (limited to 'src/contract_wrappers/token_registry_wrapper.ts')
-rw-r--r--src/contract_wrappers/token_registry_wrapper.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/contract_wrappers/token_registry_wrapper.ts b/src/contract_wrappers/token_registry_wrapper.ts
index 96346a7a4..ab0218777 100644
--- a/src/contract_wrappers/token_registry_wrapper.ts
+++ b/src/contract_wrappers/token_registry_wrapper.ts
@@ -6,19 +6,19 @@ import {ContractWrapper} from './contract_wrapper';
import * as TokenRegistryArtifacts from '../artifacts/TokenRegistry.json';
export class TokenRegistryWrapper extends ContractWrapper {
- private tokenRegistryContractIfExists?: TokenRegistryContract;
+ private _tokenRegistryContractIfExists?: TokenRegistryContract;
constructor(web3Wrapper: Web3Wrapper) {
super(web3Wrapper);
}
public invalidateContractInstance(): void {
- delete this.tokenRegistryContractIfExists;
+ delete this._tokenRegistryContractIfExists;
}
/**
* Retrieves all the tokens currently listed in the Token Registry smart contract
* @return An array of JS objects that conform to the Token interface.
*/
public async getTokensAsync(): Promise<Token[]> {
- const tokenRegistryContract = await this.getTokenRegistryContractAsync();
+ const tokenRegistryContract = await this._getTokenRegistryContractAsync();
const addresses = await tokenRegistryContract.getTokenAddresses.call();
const tokenMetadataPromises: Array<Promise<TokenMetadata>> = _.map(
@@ -37,12 +37,12 @@ export class TokenRegistryWrapper extends ContractWrapper {
});
return tokens;
}
- private async getTokenRegistryContractAsync(): Promise<TokenRegistryContract> {
- if (!_.isUndefined(this.tokenRegistryContractIfExists)) {
- return this.tokenRegistryContractIfExists;
+ private async _getTokenRegistryContractAsync(): Promise<TokenRegistryContract> {
+ if (!_.isUndefined(this._tokenRegistryContractIfExists)) {
+ return this._tokenRegistryContractIfExists;
}
- const contractInstance = await this.instantiateContractIfExistsAsync((TokenRegistryArtifacts as any));
- this.tokenRegistryContractIfExists = contractInstance as TokenRegistryContract;
- return this.tokenRegistryContractIfExists;
+ const contractInstance = await this._instantiateContractIfExistsAsync((TokenRegistryArtifacts as any));
+ this._tokenRegistryContractIfExists = contractInstance as TokenRegistryContract;
+ return this._tokenRegistryContractIfExists;
}
}