1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 17:33:23 +01:00
metamask-extension/ui/lib/explorer-link.js

13 lines
264 B
JavaScript

module.exports = function(hash, network) {
let prefix
switch (network) {
case 1: // main net
prefix = ''
case 2: // morden test net
prefix = 'testnet.'
default:
prefix = ''
}
return `http://${prefix}etherscan.io/tx/${hash}`
}