aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/buy-eth-url.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/lib/buy-eth-url.js')
-rw-r--r--app/scripts/lib/buy-eth-url.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/app/scripts/lib/buy-eth-url.js b/app/scripts/lib/buy-eth-url.js
new file mode 100644
index 000000000..b9dde3c28
--- /dev/null
+++ b/app/scripts/lib/buy-eth-url.js
@@ -0,0 +1,23 @@
+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 '4':
+ url = 'https://www.rinkeby.io/'
+ break
+
+ case '42':
+ url = 'https://github.com/kovan-testnet/faucet'
+ break
+ }
+ return url
+}