1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02: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}`
}