You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
418 B
12 lines
418 B
const uri = 'https://faucet.metamask.io/'
|
|
const METAMASK_DEBUG = 'GULP_METAMASK_DEBUG'
|
|
const env = process.env.METAMASK_ENV
|
|
|
|
module.exports = function (address) {
|
|
if (METAMASK_DEBUG || env === 'test') return // Don't faucet in development or test
|
|
var http = new XMLHttpRequest()
|
|
var data = address
|
|
http.open('POST', uri, true)
|
|
http.setRequestHeader('Content-type', 'application/rawdata')
|
|
http.send(data)
|
|
}
|
|
|