From 2ed8d579daa4d33c38891ac77d1415fcd237a187 Mon Sep 17 00:00:00 2001 From: frankiebee Date: Tue, 26 Sep 2017 13:37:13 -0700 Subject: [PATCH] listen for the blocke event on the block tracker instead of rawBlock on the provider --- app/scripts/controllers/network.js | 1 - app/scripts/controllers/transactions.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/scripts/controllers/network.js b/app/scripts/controllers/network.js index 6daedbb67..00bdca2c3 100644 --- a/app/scripts/controllers/network.js +++ b/app/scripts/controllers/network.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') } diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index fb3be6073..4e52a3c14 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -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