aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/buy-eth-url.js
blob: 91a1ec32283624e7d3332a19758065c8de4e41a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module.exports = getBuyEthUrl

function getBuyEthUrl({ network, amount, address }){
  let url
  switch (network) {
    case '1':
      url = `https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${amount}&address=${address}&crypto_currency=ETH`
      break

    case '3':
      url = 'https://faucet.metamask.io/'
      break

    case '42':
      url = 'https://github.com/kovan-testnet/faucet'
      break
  }
  return url
}