aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-27 00:35:35 +0800
committerFabio Berger <me@fabioberger.com>2017-05-27 00:35:35 +0800
commita34d083cad3a07965bcb1687dd6534a30d79b7d0 (patch)
tree0293879e434f63436b4ed5aa2b0fe92453867e2f /src
parent7e96b45ea0c51ca5589640018172a91a35596148 (diff)
downloaddexon-0x-contracts-a34d083cad3a07965bcb1687dd6534a30d79b7d0.tar.gz
dexon-0x-contracts-a34d083cad3a07965bcb1687dd6534a30d79b7d0.tar.zst
dexon-0x-contracts-a34d083cad3a07965bcb1687dd6534a30d79b7d0.zip
Refactor to ternary
Diffstat (limited to 'src')
-rw-r--r--src/ts/contract_wrappers/contract_wrapper.ts7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/ts/contract_wrappers/contract_wrapper.ts b/src/ts/contract_wrappers/contract_wrapper.ts
index 225cb960f..9f4cd8039 100644
--- a/src/ts/contract_wrappers/contract_wrapper.ts
+++ b/src/ts/contract_wrappers/contract_wrapper.ts
@@ -33,12 +33,7 @@ export class ContractWrapper {
}
try {
- let contractInstance;
- if (_.isUndefined(address)) {
- contractInstance = await c.deployed();
- } else {
- contractInstance = await c.at(address);
- }
+ const contractInstance = _.isUndefined(address) ? await c.deployed() : await c.at(address);
return contractInstance;
} catch (err) {
const errMsg = `${err}`;