Use toNumber method

feature/default_network_editable
Dan Finlay 7 years ago
parent 55c1a259b1
commit a122ec1f8b
  1. 3
      app/scripts/lib/nonce-tracker.js

@ -89,8 +89,7 @@ class NonceTracker {
const currentBlock = await this._getCurrentBlock()
const blockNumber = currentBlock.blockNumber
const baseCountBN = await this.ethQuery.getTransactionCount(address, blockNumber)
const baseString = baseCountBN.toString()
const baseCount = parseInt(baseString)
const baseCount = baseCountBN.toNumber()
assert(Number.isInteger(baseCount), `nonce-tracker - baseCount is not an integer - got: (${typeof baseCount}) "${baseCount}"`)
const nonceDetails = { blockNumber, baseCount }
return { name: 'network', nonce: baseCount, details: nonceDetails }

Loading…
Cancel
Save