mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
8498daee88
Fixes #2005
27 lines
683 B
JavaScript
27 lines
683 B
JavaScript
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
|
|
}
|