aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/scripts/controllers/balance.js6
-rw-r--r--app/scripts/controllers/computed-balances.js10
-rw-r--r--app/scripts/keyring-controller.js10
3 files changed, 13 insertions, 13 deletions
diff --git a/app/scripts/controllers/balance.js b/app/scripts/controllers/balance.js
index b4e72e751..ddeb06cf9 100644
--- a/app/scripts/controllers/balance.js
+++ b/app/scripts/controllers/balance.js
@@ -5,9 +5,9 @@ const BN = require('ethereumjs-util').BN
class BalanceController {
constructor (opts = {}) {
- const { address, ethStore, txController } = opts
+ const { address, accountTracker, txController } = opts
this.address = address
- this.ethStore = ethStore
+ this.accountTracker = accountTracker
this.txController = txController
const initState = {
@@ -39,7 +39,7 @@ class BalanceController {
}
_getBalance () {
- const store = this.ethStore.getState()
+ const store = this.accountTracker.getState()
const balances = store.accounts
const entry = balances[this.address]
const balance = entry.balance
diff --git a/app/scripts/controllers/computed-balances.js b/app/scripts/controllers/computed-balances.js
index a85eb5590..576746164 100644
--- a/app/scripts/controllers/computed-balances.js
+++ b/app/scripts/controllers/computed-balances.js
@@ -5,8 +5,8 @@ const BalanceController = require('./balance')
class ComputedbalancesController {
constructor (opts = {}) {
- const { ethStore, txController } = opts
- this.ethStore = ethStore
+ const { accountTracker, txController } = opts
+ this.accountTracker = accountTracker
this.txController = txController
const initState = extend({
@@ -25,9 +25,9 @@ class ComputedbalancesController {
}
_initBalanceUpdating () {
- const store = this.ethStore.getState()
+ const store = this.accountTracker.getState()
this.addAnyAccountsFromStore(store)
- this.ethStore.subscribe(this.addAnyAccountsFromStore.bind(this))
+ this.accountTracker.subscribe(this.addAnyAccountsFromStore.bind(this))
}
addAnyAccountsFromStore(store) {
@@ -48,7 +48,7 @@ class ComputedbalancesController {
trackAddress (address) {
let updater = new BalanceController({
address,
- ethStore: this.ethStore,
+ accountTracker: this.accountTracker,
txController: this.txController,
})
updater.store.subscribe((accountBalance) => {
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index fd57fac70..fa470dd89 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -35,7 +35,7 @@ class KeyringController extends EventEmitter {
keyrings: [],
identities: {},
})
- this.ethStore = opts.ethStore
+ this.accountTracker = opts.accountTracker
this.encryptor = encryptor
this.keyrings = []
this.getNetwork = opts.getNetwork
@@ -338,7 +338,7 @@ class KeyringController extends EventEmitter {
//
// Initializes the provided account array
// Gives them numerically incremented nicknames,
- // and adds them to the ethStore for regular balance checking.
+ // and adds them to the accountTracker for regular balance checking.
setupAccounts (accounts) {
return this.getAccounts()
.then((loadedAccounts) => {
@@ -361,7 +361,7 @@ class KeyringController extends EventEmitter {
throw new Error('Problem loading account.')
}
const address = normalizeAddress(account)
- this.ethStore.addAccount(address)
+ this.accountTracker.addAccount(address)
return this.createNickname(address)
}
@@ -567,12 +567,12 @@ class KeyringController extends EventEmitter {
clearKeyrings () {
let accounts
try {
- accounts = Object.keys(this.ethStore.getState())
+ accounts = Object.keys(this.accountTracker.getState())
} catch (e) {
accounts = []
}
accounts.forEach((address) => {
- this.ethStore.removeAccount(address)
+ this.accountTracker.removeAccount(address)
})
// clear keyrings from memory