Browse Source

utils: extract BLOCKTRAIL_API_KEY to be configurable

hk-custom-address
Daniel Cousens 10 years ago
parent
commit
430cdde766
  1. 4
      test/integration/utils.js

4
test/integration/utils.js

@ -1,9 +1,11 @@
var httpify = require('httpify') var httpify = require('httpify')
var BLOCKTRAIL_API_KEY = process.env.BLOCKTRAIL_API_KEY || 'c0bd8155c66e3fb148bb1664adc1e4dacd872548'
function faucetWithdraw (address, amount, callback) { function faucetWithdraw (address, amount, callback) {
httpify({ httpify({
method: 'POST', method: 'POST',
url: 'https://api.blocktrail.com/v1/tBTC/faucet/withdrawl?api_key=c0bd8155c66e3fb148bb1664adc1e4dacd872548', url: 'https://api.blocktrail.com/v1/tBTC/faucet/withdrawl?api_key=' + BLOCKTRAIL_API_KEY,
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ body: JSON.stringify({
address: address, address: address,

Loading…
Cancel
Save