aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/metamask-controller.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-11-22 08:46:26 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-11-22 08:46:26 +0800
commit1cbab788ec21ba096d4375015c6cd3cd481de5b2 (patch)
treeaeb41f412e2567108099cec462e969e81a902304 /app/scripts/metamask-controller.js
parentf5b0795ac5582dd53de728479cf47c43eabfe67c (diff)
downloadtangerine-wallet-browser-1cbab788ec21ba096d4375015c6cd3cd481de5b2.tar
tangerine-wallet-browser-1cbab788ec21ba096d4375015c6cd3cd481de5b2.tar.gz
tangerine-wallet-browser-1cbab788ec21ba096d4375015c6cd3cd481de5b2.tar.bz2
tangerine-wallet-browser-1cbab788ec21ba096d4375015c6cd3cd481de5b2.tar.lz
tangerine-wallet-browser-1cbab788ec21ba096d4375015c6cd3cd481de5b2.tar.xz
tangerine-wallet-browser-1cbab788ec21ba096d4375015c6cd3cd481de5b2.tar.zst
tangerine-wallet-browser-1cbab788ec21ba096d4375015c6cd3cd481de5b2.zip
Change fauceting to become a response of an emit.
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r--app/scripts/metamask-controller.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index d230b3483..8ff7ab5b2 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -7,6 +7,8 @@ const HostStore = require('./lib/remote-store.js').HostStore
const Web3 = require('web3')
const ConfigManager = require('./lib/config-manager')
const extension = require('./lib/extension')
+const autoFaucet = require('./lib/auto-faucet')
+
module.exports = class MetamaskController {
@@ -174,6 +176,10 @@ module.exports = class MetamaskController {
this.sendUpdate()
})
+ this.keyringController.on('newAccount', (account) => {
+ autoFaucet(account)
+ })
+
// keyringController substate
function keyringControllerToPublic (state) {
return {