mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Use toNumber method
This commit is contained in:
parent
55c1a259b1
commit
a122ec1f8b
@ -89,8 +89,7 @@ class NonceTracker {
|
|||||||
const currentBlock = await this._getCurrentBlock()
|
const currentBlock = await this._getCurrentBlock()
|
||||||
const blockNumber = currentBlock.blockNumber
|
const blockNumber = currentBlock.blockNumber
|
||||||
const baseCountBN = await this.ethQuery.getTransactionCount(address, blockNumber)
|
const baseCountBN = await this.ethQuery.getTransactionCount(address, blockNumber)
|
||||||
const baseString = baseCountBN.toString()
|
const baseCount = baseCountBN.toNumber()
|
||||||
const baseCount = parseInt(baseString)
|
|
||||||
assert(Number.isInteger(baseCount), `nonce-tracker - baseCount is not an integer - got: (${typeof baseCount}) "${baseCount}"`)
|
assert(Number.isInteger(baseCount), `nonce-tracker - baseCount is not an integer - got: (${typeof baseCount}) "${baseCount}"`)
|
||||||
const nonceDetails = { blockNumber, baseCount }
|
const nonceDetails = { blockNumber, baseCount }
|
||||||
return { name: 'network', nonce: baseCount, details: nonceDetails }
|
return { name: 'network', nonce: baseCount, details: nonceDetails }
|
||||||
|
Loading…
Reference in New Issue
Block a user