1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 18:41:38 +01:00

Merge pull request #1786 from MetaMask/turnOffAutoFaucet

turn off auto faucet
This commit is contained in:
Dan Finlay 2017-07-17 14:49:12 -07:00 committed by GitHub
commit 5f2335e68f
3 changed files with 1 additions and 24 deletions

View File

@ -2,6 +2,7 @@
## Current Master
- No longer automatically request 1 ropsten ether for the first account in a new vault.
- Now redirects from known malicious sites faster.
- Added a link to our new support page to the help screen.

View File

@ -1,20 +0,0 @@
const uri = 'https://faucet.metamask.io/'
const METAMASK_DEBUG = 'GULP_METAMASK_DEBUG'
const env = process.env.METAMASK_ENV
module.exports = function (address) {
// Don't faucet in development or test
if (METAMASK_DEBUG === true || env === 'test') return
global.log.info('auto-fauceting:', address)
const data = address
const headers = new Headers()
headers.append('Content-type', 'application/rawdata')
fetch(uri, {
method: 'POST',
headers,
body: data,
})
.catch((err) => {
console.error(err)
})
}

View File

@ -20,7 +20,6 @@ const MessageManager = require('./lib/message-manager')
const PersonalMessageManager = require('./lib/personal-message-manager')
const TransactionController = require('./controllers/transactions')
const ConfigManager = require('./lib/config-manager')
const autoFaucet = require('./lib/auto-faucet')
const nodeify = require('./lib/nodeify')
const accountImporter = require('./account-import-strategies')
const getBuyEthUrl = require('./lib/buy-eth-url')
@ -90,9 +89,6 @@ module.exports = class MetamaskController extends EventEmitter {
this.keyringController.on('newAccount', (address) => {
this.preferencesController.setSelectedAddress(address)
})
this.keyringController.on('newVault', (address) => {
autoFaucet(address)
})
// address book controller
this.addressBookController = new AddressBookController({