diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-11-08 14:08:40 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-11-08 14:08:40 +0800 |
commit | d7742029c7ff991e60352cddeb52c2cdc1589a57 (patch) | |
tree | 8a7118ba2b74a3f3b1871015f8f43e931c1b21db /packages/instant/src/util | |
parent | 1151371e57643662b14c0c940ec558e74a6d1120 (diff) | |
download | dexon-sol-tools-d7742029c7ff991e60352cddeb52c2cdc1589a57.tar dexon-sol-tools-d7742029c7ff991e60352cddeb52c2cdc1589a57.tar.gz dexon-sol-tools-d7742029c7ff991e60352cddeb52c2cdc1589a57.tar.bz2 dexon-sol-tools-d7742029c7ff991e60352cddeb52c2cdc1589a57.tar.lz dexon-sol-tools-d7742029c7ff991e60352cddeb52c2cdc1589a57.tar.xz dexon-sol-tools-d7742029c7ff991e60352cddeb52c2cdc1589a57.tar.zst dexon-sol-tools-d7742029c7ff991e60352cddeb52c2cdc1589a57.zip |
feat: implement copy-to-clipboard
Diffstat (limited to 'packages/instant/src/util')
-rw-r--r-- | packages/instant/src/util/etherscan.ts | 7 |
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}`; + }, }; |