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

13 lines
264 B
JavaScript
Raw Normal View History

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}`
}