aboutsummaryrefslogtreecommitdiffstats
path: root/ui/lib/account-link.js
diff options
context:
space:
mode:
authorCsaba S <csaba.solya@gmail.com>2018-02-22 21:55:46 +0800
committerGitHub <noreply@github.com>2018-02-22 21:55:46 +0800
commit2f3463048685759319eb320c916cc7bc23a41649 (patch)
treee53ac24a1a127f1c684327bca00d23f51b56c542 /ui/lib/account-link.js
parent5ec311ba3e01bd9b0a9ff447fd7639d22a7b3d9c (diff)
parenteed75735b8e90d121537249cf147c1ece60f1e47 (diff)
downloadtangerine-wallet-browser-2f3463048685759319eb320c916cc7bc23a41649.tar
tangerine-wallet-browser-2f3463048685759319eb320c916cc7bc23a41649.tar.gz
tangerine-wallet-browser-2f3463048685759319eb320c916cc7bc23a41649.tar.bz2
tangerine-wallet-browser-2f3463048685759319eb320c916cc7bc23a41649.tar.lz
tangerine-wallet-browser-2f3463048685759319eb320c916cc7bc23a41649.tar.xz
tangerine-wallet-browser-2f3463048685759319eb320c916cc7bc23a41649.tar.zst
tangerine-wallet-browser-2f3463048685759319eb320c916cc7bc23a41649.zip
Merge branch 'master' into edge-support
Diffstat (limited to 'ui/lib/account-link.js')
-rw-r--r--ui/lib/account-link.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/ui/lib/account-link.js b/ui/lib/account-link.js
new file mode 100644
index 000000000..037d990fa
--- /dev/null
+++ b/ui/lib/account-link.js
@@ -0,0 +1,26 @@
+module.exports = function (address, network) {
+ const net = parseInt(network)
+ let link
+ switch (net) {
+ case 1: // main net
+ link = `https://etherscan.io/address/${address}`
+ break
+ case 2: // morden test net
+ link = `https://morden.etherscan.io/address/${address}`
+ break
+ case 3: // ropsten test net
+ link = `https://ropsten.etherscan.io/address/${address}`
+ break
+ case 4: // rinkeby test net
+ link = `https://rinkeby.etherscan.io/address/${address}`
+ break
+ case 42: // kovan test net
+ link = `https://kovan.etherscan.io/address/${address}`
+ break
+ default:
+ link = ''
+ break
+ }
+
+ return link
+}