1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 03:36:18 +02:00

listen for the blocke event on the block tracker instead of rawBlock on the provider

This commit is contained in:
frankiebee 2017-09-26 13:37:13 -07:00
parent b654eb9b1f
commit 2ed8d579da
2 changed files with 1 additions and 2 deletions

View File

@ -52,7 +52,6 @@ module.exports = class NetworkController extends EventEmitter {
// apply the listners created by other controllers
const blockTrackerHandlers = this.provider._blockTracker.proxyEventHandlers
this.provider.setTarget(this._provider)
this.provider._blockTracker = createEventEmitterProxy(this._provider._blockTracker, blockTrackerHandlers)
this.emit('networkDidChange')
}

View File

@ -70,7 +70,7 @@ module.exports = class TransactionController extends EventEmitter {
this.pendingTxTracker.on('txFailed', this.setTxStatusFailed.bind(this))
this.pendingTxTracker.on('txConfirmed', this.setTxStatusConfirmed.bind(this))
this.blockTracker.on('rawBlock', this.pendingTxTracker.checkForTxInBlock.bind(this.pendingTxTracker))
this.blockTracker.on('block', this.pendingTxTracker.checkForTxInBlock.bind(this.pendingTxTracker))
// 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