aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-04-05 00:43:25 +0800
committerGitHub <noreply@github.com>2017-04-05 00:43:25 +0800
commit39181ed33f1b9829f82c44d2f21e2f3ab1d1c979 (patch)
tree7f9599aa4635b274b1cc3d31d70b4301f570ab9c /app
parent953a29b19e30189954eb33f515004769081e856c (diff)
parent0a7b388b39d86039e4e4cf5df8dfe5104e7b6137 (diff)
downloadtangerine-wallet-browser-39181ed33f1b9829f82c44d2f21e2f3ab1d1c979.tar
tangerine-wallet-browser-39181ed33f1b9829f82c44d2f21e2f3ab1d1c979.tar.gz
tangerine-wallet-browser-39181ed33f1b9829f82c44d2f21e2f3ab1d1c979.tar.bz2
tangerine-wallet-browser-39181ed33f1b9829f82c44d2f21e2f3ab1d1c979.tar.lz
tangerine-wallet-browser-39181ed33f1b9829f82c44d2f21e2f3ab1d1c979.tar.xz
tangerine-wallet-browser-39181ed33f1b9829f82c44d2f21e2f3ab1d1c979.tar.zst
tangerine-wallet-browser-39181ed33f1b9829f82c44d2f21e2f3ab1d1c979.zip
Merge pull request #1308 from MetaMask/FixFaucet
Fix faucet to only autoFaucet first account
Diffstat (limited to 'app')
-rw-r--r--app/scripts/keyring-controller.js1
-rw-r--r--app/scripts/metamask-controller.js2
2 files changed, 3 insertions, 0 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index 72f613641..16df6efa6 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-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))
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index af8b4688d..5f71fc369 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -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)
})