aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/auto-faucet.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-03-30 03:21:46 +0800
committerDan Finlay <dan@danfinlay.com>2016-03-30 03:21:46 +0800
commitd6dee7e748dbb61e3ae1a8f30f05b132badf951d (patch)
tree5be6d6813c675c4007e8cf8c2390d7cd73b5a215 /app/scripts/lib/auto-faucet.js
parent39160d3025a1d9e327f48b034c083808663e2481 (diff)
downloadtangerine-wallet-browser-d6dee7e748dbb61e3ae1a8f30f05b132badf951d.tar
tangerine-wallet-browser-d6dee7e748dbb61e3ae1a8f30f05b132badf951d.tar.gz
tangerine-wallet-browser-d6dee7e748dbb61e3ae1a8f30f05b132badf951d.tar.bz2
tangerine-wallet-browser-d6dee7e748dbb61e3ae1a8f30f05b132badf951d.tar.lz
tangerine-wallet-browser-d6dee7e748dbb61e3ae1a8f30f05b132badf951d.tar.xz
tangerine-wallet-browser-d6dee7e748dbb61e3ae1a8f30f05b132badf951d.tar.zst
tangerine-wallet-browser-d6dee7e748dbb61e3ae1a8f30f05b132badf951d.zip
Add auto-fauceting
When first creating a vault, the first account is submitted to our `rawtestrpc` faucet, receiving `1.337` ether within 15-30 seconds.
Diffstat (limited to 'app/scripts/lib/auto-faucet.js')
-rw-r--r--app/scripts/lib/auto-faucet.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/scripts/lib/auto-faucet.js b/app/scripts/lib/auto-faucet.js
new file mode 100644
index 000000000..b347add44
--- /dev/null
+++ b/app/scripts/lib/auto-faucet.js
@@ -0,0 +1,11 @@
+var uri = 'https://faucet.metamask.io/'
+
+module.exports = function(address) {
+
+ var http = new XMLHttpRequest()
+ var data = address
+ http.open('POST', uri, true)
+ http.setRequestHeader('Content-type', 'application/rawdata')
+ http.send(data)
+
+}