aboutsummaryrefslogtreecommitdiffstats
path: root/ui/lib/tx-link.js
blob: 7d5d5432e68d408dc879a29b6c44e9b85858f9cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module.exports = function (txHash, network) {
  const net = parseInt(network)
  let link
  switch (net) {
    case 1: // main net
    case 237: // main net
      link = `https://dexonscan.app/transaction/${txHash}`
      break
    case 2: // test net
    case 238: // test net
    default:
      link = `https://testnet.dexonscan.app/transaction/${txHash}`
      break
  }

  return link
}