aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/scripts/lib/account-tracker.js5
-rw-r--r--app/scripts/lib/pending-tx-tracker.js2
-rw-r--r--test/unit/pending-tx-test.js6
3 files changed, 6 insertions, 7 deletions
diff --git a/app/scripts/lib/account-tracker.js b/app/scripts/lib/account-tracker.js
index 07fc32b10..a108d0d4f 100644
--- a/app/scripts/lib/account-tracker.js
+++ b/app/scripts/lib/account-tracker.js
@@ -58,9 +58,8 @@ class AccountTracker extends EventEmitter {
//
_updateForBlock (block) {
- const blockNumber = '0x' + block.number.toString('hex')
- this._currentBlockNumber = blockNumber
- const currentBlockGasLimit = ethUtil.addHexPrefix(block.gasLimit.toString())
+ this._currentBlockNumber = block.number
+ const currentBlockGasLimit = block.gasLimit
this.store.updateState({ currentBlockGasLimit })
diff --git a/app/scripts/lib/pending-tx-tracker.js b/app/scripts/lib/pending-tx-tracker.js
index b07a6bd39..b97cec9ce 100644
--- a/app/scripts/lib/pending-tx-tracker.js
+++ b/app/scripts/lib/pending-tx-tracker.js
@@ -53,7 +53,7 @@ module.exports = class PendingTransactionTracker extends EventEmitter {
})
}
- queryPendingTxs ({oldBlock, newBlock}) {
+ queryPendingTxs ({ oldBlock, newBlock }) {
// check pending transactions on start
if (!oldBlock) {
this._checkPendingTxs()
diff --git a/test/unit/pending-tx-test.js b/test/unit/pending-tx-test.js
index 2865a30e6..1af464656 100644
--- a/test/unit/pending-tx-test.js
+++ b/test/unit/pending-tx-test.js
@@ -84,14 +84,14 @@ describe('PendingTransactionTracker', function () {
let newBlock, oldBlock
newBlock = { number: '0x01' }
pendingTxTracker._checkPendingTxs = done
- pendingTxTracker.queryPendingTxs({oldBlock, newBlock})
+ pendingTxTracker.queryPendingTxs({ oldBlock, newBlock })
})
it('should call #_checkPendingTxs if oldBlock and the newBlock have a diff of greater then 1', function (done) {
let newBlock, oldBlock
oldBlock = { number: '0x01' }
newBlock = { number: '0x03' }
pendingTxTracker._checkPendingTxs = done
- pendingTxTracker.queryPendingTxs({oldBlock, newBlock})
+ pendingTxTracker.queryPendingTxs({ oldBlock, newBlock })
})
it('should not call #_checkPendingTxs if oldBlock and the newBlock have a diff of 1 or less', function (done) {
let newBlock, oldBlock
@@ -101,7 +101,7 @@ describe('PendingTransactionTracker', function () {
const err = new Error('should not call #_checkPendingTxs if oldBlock and the newBlock have a diff of 1 or less')
done(err)
}
- pendingTxTracker.queryPendingTxs({oldBlock, newBlock})
+ pendingTxTracker.queryPendingTxs({ oldBlock, newBlock })
done()
})
})