aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/computed-balances.js
diff options
context:
space:
mode:
authorChi Kei Chan <chikeichan@gmail.com>2017-10-25 07:56:49 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-10-25 07:56:49 +0800
commit301c737bbc3a484fb49d2e1f868a576cea73e60a (patch)
treef109a25ae1e56dd28da5b259b933a857f0bc1be4 /app/scripts/controllers/computed-balances.js
parent3f1ae92bb7d4ca4629995f32dc03f37e6460a864 (diff)
parent1767dceba44f6d173bf3cdb8436d117c7f29b834 (diff)
downloadtangerine-wallet-browser-301c737bbc3a484fb49d2e1f868a576cea73e60a.tar.gz
tangerine-wallet-browser-301c737bbc3a484fb49d2e1f868a576cea73e60a.tar.zst
tangerine-wallet-browser-301c737bbc3a484fb49d2e1f868a576cea73e60a.zip
Merge branch 'master' into NewUI-flat
Diffstat (limited to 'app/scripts/controllers/computed-balances.js')
-rw-r--r--app/scripts/controllers/computed-balances.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/scripts/controllers/computed-balances.js b/app/scripts/controllers/computed-balances.js
index 9855f715e..907b087cf 100644
--- a/app/scripts/controllers/computed-balances.js
+++ b/app/scripts/controllers/computed-balances.js
@@ -32,13 +32,13 @@ class ComputedbalancesController {
this.accountTracker.store.subscribe(this.syncAllAccountsFromStore.bind(this))
}
- syncAllAccountsFromStore(store) {
+ syncAllAccountsFromStore (store) {
const upstream = Object.keys(store.accounts)
const balances = Object.keys(this.balances)
.map(address => this.balances[address])
// Follow new addresses
- for (let address in balances) {
+ for (const address in balances) {
this.trackAddressIfNotAlready(address)
}
@@ -58,14 +58,14 @@ class ComputedbalancesController {
}
trackAddress (address) {
- let updater = new BalanceController({
+ const updater = new BalanceController({
address,
accountTracker: this.accountTracker,
txController: this.txController,
blockTracker: this.blockTracker,
})
updater.store.subscribe((accountBalance) => {
- let newState = this.store.getState()
+ const newState = this.store.getState()
newState.computedBalances[address] = accountBalance
this.store.updateState(newState)
})