mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
fall back to latest
if blockNumber is null
This commit is contained in:
parent
803e696cdc
commit
c2624dd1a0
@ -88,7 +88,7 @@ class NonceTracker {
|
||||
// and pending count are from the same block
|
||||
const currentBlock = await this._getCurrentBlock()
|
||||
const blockNumber = currentBlock.blockNumber
|
||||
const baseCountBN = await this.ethQuery.getTransactionCount(address, blockNumber)
|
||||
const baseCountBN = await this.ethQuery.getTransactionCount(address, blockNumber || 'latest')
|
||||
const baseCount = baseCountBN.toNumber()
|
||||
assert(Number.isInteger(baseCount), `nonce-tracker - baseCount is not an integer - got: (${typeof baseCount}) "${baseCount}"`)
|
||||
const nonceDetails = { blockNumber, baseCount }
|
||||
|
Loading…
Reference in New Issue
Block a user