aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-08-24 16:02:45 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-08-24 16:02:45 +0800
commit0ba0d2f8d1645f9ed79ca8dfc15e0bb49f5782ea (patch)
tree6f39c55c2e31308f2b4fd7830d42c45f068a2efb /src
parent846eec62698af06549f83aae5e661f67291bb329 (diff)
downloaddexon-0x-contracts-0ba0d2f8d1645f9ed79ca8dfc15e0bb49f5782ea.tar.gz
dexon-0x-contracts-0ba0d2f8d1645f9ed79ca8dfc15e0bb49f5782ea.tar.zst
dexon-0x-contracts-0ba0d2f8d1645f9ed79ca8dfc15e0bb49f5782ea.zip
Remove redundant else's
Diffstat (limited to 'src')
-rw-r--r--src/contract_wrappers/token_registry_wrapper.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/contract_wrappers/token_registry_wrapper.ts b/src/contract_wrappers/token_registry_wrapper.ts
index 7a88d329d..693131200 100644
--- a/src/contract_wrappers/token_registry_wrapper.ts
+++ b/src/contract_wrappers/token_registry_wrapper.ts
@@ -56,9 +56,8 @@ export class TokenRegistryWrapper extends ContractWrapper {
const addressIfExists = await tokenRegistryContract.getTokenAddressBySymbol.call(symbol);
if (addressIfExists === constants.NULL_ADDRESS) {
return undefined;
- } else {
- return addressIfExists;
}
+ return addressIfExists;
}
public async getTokenAddressByNameIfExistsAsync(name: string): Promise<string|undefined> {
assert.isString('name', name);
@@ -66,9 +65,8 @@ export class TokenRegistryWrapper extends ContractWrapper {
const addressIfExists = await tokenRegistryContract.getTokenAddressByName.call(name);
if (addressIfExists === constants.NULL_ADDRESS) {
return undefined;
- } else {
- return addressIfExists;
}
+ return addressIfExists;
}
public async getTokenBySymbolIfExistsAsync(symbol: string): Promise<Token|undefined> {
assert.isString('symbol', symbol);