aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-08-24 00:14:19 +0800
committerFabio Berger <me@fabioberger.com>2017-08-24 00:14:19 +0800
commit98be7867649337a18441e517790c748c722ee730 (patch)
treee585796a6ee17e97b17b745b2ce1fd2d9ca6d35c /src/contract_wrappers
parentc12e48d28a811ace4bf7543a5c06471170ddf3f9 (diff)
downloaddexon-sol-tools-98be7867649337a18441e517790c748c722ee730.tar
dexon-sol-tools-98be7867649337a18441e517790c748c722ee730.tar.gz
dexon-sol-tools-98be7867649337a18441e517790c748c722ee730.tar.bz2
dexon-sol-tools-98be7867649337a18441e517790c748c722ee730.tar.lz
dexon-sol-tools-98be7867649337a18441e517790c748c722ee730.tar.xz
dexon-sol-tools-98be7867649337a18441e517790c748c722ee730.tar.zst
dexon-sol-tools-98be7867649337a18441e517790c748c722ee730.zip
rename method for clarity since we return a Token and not tokenMetadata
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r--src/contract_wrappers/token_registry_wrapper.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/contract_wrappers/token_registry_wrapper.ts b/src/contract_wrappers/token_registry_wrapper.ts
index c106a4a40..58c191ea5 100644
--- a/src/contract_wrappers/token_registry_wrapper.ts
+++ b/src/contract_wrappers/token_registry_wrapper.ts
@@ -24,7 +24,7 @@ export class TokenRegistryWrapper extends ContractWrapper {
const addresses = await tokenRegistryContract.getTokenAddresses.call();
const tokenPromises: Array<Promise<Token|undefined>> = _.map(
addresses,
- (address: string) => (this.getTokenMetadataIfExistsAsync(address)),
+ (address: string) => (this.getTokenIfExistsAsync(address)),
);
const tokens = await Promise.all(tokenPromises);
return tokens as Token[];
@@ -33,7 +33,7 @@ export class TokenRegistryWrapper extends ContractWrapper {
* Retrieves a token by address currently listed in the Token Registry smart contract
* @return An object that conforms to the Token interface or undefined if token not found.
*/
- public async getTokenMetadataIfExistsAsync(address: string): Promise<Token|undefined> {
+ public async getTokenIfExistsAsync(address: string): Promise<Token|undefined> {
assert.isETHAddressHex('address', address);
const tokenRegistryContract = await this._getTokenRegistryContractAsync();