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

feature/default_network_editable
frankiebee 7 years ago
parent b654eb9b1f
commit 2ed8d579da
  1. 1
      app/scripts/controllers/network.js
  2. 2
      app/scripts/controllers/transactions.js

@ -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')
}

@ -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

Loading…
Cancel
Save