Merge pull request #1308 from MetaMask/FixFaucet

Fix faucet to only autoFaucet first account
feature/default_network_editable
Kevin Serrano 8 years ago committed by GitHub
commit 39181ed33f
  1. 1
      app/scripts/keyring-controller.js
  2. 2
      app/scripts/metamask-controller.js

@ -324,6 +324,7 @@ class KeyringController extends EventEmitter {
if (!firstAccount) throw new Error('KeyringController - No account found on keychain.')
const hexAccount = normalizeAddress(firstAccount)
this.emit('newAccount', hexAccount)
this.emit('newVault', hexAccount)
return this.setupAccounts(accounts)
})
.then(this.persistAllKeyrings.bind(this))

@ -79,6 +79,8 @@ module.exports = class MetamaskController extends EventEmitter {
})
this.keyringController.on('newAccount', (address) => {
this.preferencesController.setSelectedAddress(address)
})
this.keyringController.on('newVault', (address) => {
autoFaucet(address)
})

Loading…
Cancel
Save