aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/transactions.js
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-08-05 02:50:34 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-08-05 02:50:34 +0800
commit08f49ab35f5a78fba6921a2957a92e0a2e5b065a (patch)
tree73774ad8e99e5a954a2a96ff3ef1839ae0348076 /app/scripts/controllers/transactions.js
parent89a4fef1e4043323c89bf8aea8600a16353c4d1b (diff)
downloadtangerine-wallet-browser-08f49ab35f5a78fba6921a2957a92e0a2e5b065a.tar
tangerine-wallet-browser-08f49ab35f5a78fba6921a2957a92e0a2e5b065a.tar.gz
tangerine-wallet-browser-08f49ab35f5a78fba6921a2957a92e0a2e5b065a.tar.bz2
tangerine-wallet-browser-08f49ab35f5a78fba6921a2957a92e0a2e5b065a.tar.lz
tangerine-wallet-browser-08f49ab35f5a78fba6921a2957a92e0a2e5b065a.tar.xz
tangerine-wallet-browser-08f49ab35f5a78fba6921a2957a92e0a2e5b065a.tar.zst
tangerine-wallet-browser-08f49ab35f5a78fba6921a2957a92e0a2e5b065a.zip
rename PendingTransactionUtils -> PendingTransactionWatchers
Diffstat (limited to 'app/scripts/controllers/transactions.js')
-rw-r--r--app/scripts/controllers/transactions.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js
index 498cac9af..c1a0ef0f3 100644
--- a/app/scripts/controllers/transactions.js
+++ b/app/scripts/controllers/transactions.js
@@ -5,7 +5,7 @@ const ObservableStore = require('obs-store')
const ethUtil = require('ethereumjs-util')
const EthQuery = require('ethjs-query')
const TxProviderUtil = require('../lib/tx-utils')
-const PendingTransactionUtils = require('../lib/pending-tx-watchers')
+const PendingTransactionWatchers = require('../lib/pending-tx-watchers')
const createId = require('../lib/random-id')
const NonceTracker = require('../lib/nonce-tracker')
@@ -37,7 +37,7 @@ module.exports = class TransactionController extends EventEmitter {
this.query = new EthQuery(this.provider)
this.txProviderUtils = new TxProviderUtil(this.provider)
- this.pendingTxUtils = new PendingTransactionUtils({
+ this.pendingTxWatcher = new PendingTransactionWatchers({
provider: this.provider,
nonceTracker: this.nonceTracker,
getBalance: (address) => this.ethStore.getState().accounts[address].balance,
@@ -50,16 +50,16 @@ module.exports = class TransactionController extends EventEmitter {
},
})
- this.pendingTxUtils.on('txWarning', this.updateTx.bind(this))
- this.pendingTxUtils.on('txFailed', this.setTxStatusFailed.bind(this))
- this.pendingTxUtils.on('txConfirmed', this.setTxStatusConfirmed.bind(this))
+ this.pendingTxWatcher.on('txWarning', this.updateTx.bind(this))
+ this.pendingTxWatcher.on('txFailed', this.setTxStatusFailed.bind(this))
+ this.pendingTxWatcher.on('txConfirmed', this.setTxStatusConfirmed.bind(this))
- this.blockTracker.on('rawBlock', this.pendingTxUtils.checkForTxInBlock.bind(this))
+ this.blockTracker.on('rawBlock', this.pendingTxWatcher.checkForTxInBlock.bind(this))
// this is a little messy but until ethstore has been either
// removed or redone this is to guard against the race condition
// where ethStore hasent been populated by the results yet
- this.blockTracker.once('latest', () => this.blockTracker.on('latest', this.pendingTxUtils.resubmitPendingTxs.bind(this)))
- this.blockTracker.on('sync', this.pendingTxUtils.queryPendingTxs.bind(this))
+ this.blockTracker.once('latest', () => this.blockTracker.on('latest', this.pendingTxWatcher.resubmitPendingTxs.bind(this)))
+ this.blockTracker.on('sync', this.pendingTxWatcher.queryPendingTxs.bind(this))
// memstore is computed from a few different stores
this._updateMemstore()
this.store.subscribe(() => this._updateMemstore())