aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util/etherscan.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-11-12 05:11:10 +0800
committerFabio Berger <me@fabioberger.com>2018-11-12 05:11:10 +0800
commit0391f93490cffdc69f6cb32f11762d174ed04e37 (patch)
tree3a8b30a04de1193aa21e5b84bd572db24979a8bf /packages/instant/src/util/etherscan.ts
parent399a7d5fec9af4f3491a77f0c2d46738f3d8ffa7 (diff)
parent397b4e289015f9bb0831c1a0ce6fee601670b487 (diff)
downloaddexon-0x-contracts-0391f93490cffdc69f6cb32f11762d174ed04e37.tar.gz
dexon-0x-contracts-0391f93490cffdc69f6cb32f11762d174ed04e37.tar.zst
dexon-0x-contracts-0391f93490cffdc69f6cb32f11762d174ed04e37.zip
merge development
Diffstat (limited to 'packages/instant/src/util/etherscan.ts')
-rw-r--r--packages/instant/src/util/etherscan.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/instant/src/util/etherscan.ts b/packages/instant/src/util/etherscan.ts
index cfc2578a3..4d62c4d9f 100644
--- a/packages/instant/src/util/etherscan.ts
+++ b/packages/instant/src/util/etherscan.ts
@@ -21,4 +21,11 @@ export const etherscanUtil = {
}
return `https://${prefix}etherscan.io/tx/${txHash}`;
},
+ getEtherScanEthAddressIfExists: (ethAddress: string, networkId: number) => {
+ const prefix = etherscanPrefix(networkId);
+ if (_.isUndefined(prefix)) {
+ return;
+ }
+ return `https://${prefix}etherscan.io/address/${ethAddress}`;
+ },
};