aboutsummaryrefslogtreecommitdiffstats
path: root/ui/lib/account-link.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/lib/account-link.js')
-rw-r--r--ui/lib/account-link.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/ui/lib/account-link.js b/ui/lib/account-link.js
new file mode 100644
index 000000000..eb958e22d
--- /dev/null
+++ b/ui/lib/account-link.js
@@ -0,0 +1,18 @@
+module.exports = function(address, network) {
+ const net = parseInt(network)
+ let link
+
+ switch (net) {
+ case 1: // main net
+ link = `http://etherscan.io/address/${address}`
+ break
+ case 2: // morden test net
+ link = `http://testnet.etherscan.io/address/${address}`
+ break
+ default:
+ link = ''
+ break
+ }
+
+ return link
+}