aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-08-24 16:04:56 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-08-24 16:04:56 +0800
commit5dce4c3b3b655c190100b480ef50a423f3344ee6 (patch)
treebf669e98f6e187432c3acea467d5ad3fd772b91a
parent0ba0d2f8d1645f9ed79ca8dfc15e0bb49f5782ea (diff)
downloaddexon-sol-tools-5dce4c3b3b655c190100b480ef50a423f3344ee6.tar
dexon-sol-tools-5dce4c3b3b655c190100b480ef50a423f3344ee6.tar.gz
dexon-sol-tools-5dce4c3b3b655c190100b480ef50a423f3344ee6.tar.bz2
dexon-sol-tools-5dce4c3b3b655c190100b480ef50a423f3344ee6.tar.lz
dexon-sol-tools-5dce4c3b3b655c190100b480ef50a423f3344ee6.tar.xz
dexon-sol-tools-5dce4c3b3b655c190100b480ef50a423f3344ee6.tar.zst
dexon-sol-tools-5dce4c3b3b655c190100b480ef50a423f3344ee6.zip
Rename _getTokenByMetadata to _createTokenFromMetadata
-rw-r--r--src/contract_wrappers/token_registry_wrapper.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/contract_wrappers/token_registry_wrapper.ts b/src/contract_wrappers/token_registry_wrapper.ts
index 693131200..5fee1304e 100644
--- a/src/contract_wrappers/token_registry_wrapper.ts
+++ b/src/contract_wrappers/token_registry_wrapper.ts
@@ -47,7 +47,7 @@ export class TokenRegistryWrapper extends ContractWrapper {
const tokenRegistryContract = await this._getTokenRegistryContractAsync();
const metadata = await tokenRegistryContract.getTokenMetaData.call(address);
- const token = this._getTokenByMetadata(metadata);
+ const token = this._createTokenFromMetadata(metadata);
return token;
}
public async getTokenAddressBySymbolIfExistsAsync(symbol: string): Promise<string|undefined> {
@@ -72,17 +72,17 @@ export class TokenRegistryWrapper extends ContractWrapper {
assert.isString('symbol', symbol);
const tokenRegistryContract = await this._getTokenRegistryContractAsync();
const metadata = await tokenRegistryContract.getTokenBySymbol.call(symbol);
- const token = this._getTokenByMetadata(metadata);
+ const token = this._createTokenFromMetadata(metadata);
return token;
}
public async getTokenByNameIfExistsAsync(name: string): Promise<Token|undefined> {
assert.isString('name', name);
const tokenRegistryContract = await this._getTokenRegistryContractAsync();
const metadata = await tokenRegistryContract.getTokenByName.call(name);
- const token = this._getTokenByMetadata(metadata);
+ const token = this._createTokenFromMetadata(metadata);
return token;
}
- private _getTokenByMetadata(metadata: TokenMetadata): Token|undefined {
+ private _createTokenFromMetadata(metadata: TokenMetadata): Token|undefined {
if (metadata[0] === constants.NULL_ADDRESS) {
return undefined;
}