aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/keyring-controller.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-11-01 00:47:20 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-11-01 00:47:20 +0800
commit6fc498f8a030ea00bcef9b8b3400fc527fc4aeed (patch)
tree11782cb4e0a92d077ea2f0c5db4f28b472852e61 /app/scripts/keyring-controller.js
parentf9409793d8a4413c42e5d11ec0279c893c7c446c (diff)
downloadtangerine-wallet-browser-6fc498f8a030ea00bcef9b8b3400fc527fc4aeed.tar
tangerine-wallet-browser-6fc498f8a030ea00bcef9b8b3400fc527fc4aeed.tar.gz
tangerine-wallet-browser-6fc498f8a030ea00bcef9b8b3400fc527fc4aeed.tar.bz2
tangerine-wallet-browser-6fc498f8a030ea00bcef9b8b3400fc527fc4aeed.tar.lz
tangerine-wallet-browser-6fc498f8a030ea00bcef9b8b3400fc527fc4aeed.tar.xz
tangerine-wallet-browser-6fc498f8a030ea00bcef9b8b3400fc527fc4aeed.tar.zst
tangerine-wallet-browser-6fc498f8a030ea00bcef9b8b3400fc527fc4aeed.zip
Implement auto-fauceting
Diffstat (limited to 'app/scripts/keyring-controller.js')
-rw-r--r--app/scripts/keyring-controller.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index b8066e303..e7b9612bf 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -8,6 +8,7 @@ const EthQuery = require('eth-query')
const BN = ethUtil.BN
const Transaction = require('ethereumjs-tx')
const createId = require('web3-provider-engine/util/random-id')
+const autoFaucet = require('./lib/auto-faucet')
// TEMPORARY UNTIL FULL DEPRECATION:
const IdStoreMigrator = require('./lib/idStore-migrator')
@@ -90,7 +91,11 @@ module.exports = class KeyringController extends EventEmitter {
if (!serialized) {
// TEMPORARY SINGLE-KEYRING CONFIG:
- return this.addNewKeyring('HD Key Tree', null, cb)
+ return this.addNewKeyring('HD Key Tree', null, (err, newState) => {
+ const firstAccount = this.keyrings[0].getAccounts()[0]
+ autoFaucet(ethUtil.addHexPrefix(firstAccount))
+ cb(err, newState)
+ })
} else {
return this.submitPassword(password, cb)
}