aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-08-24 15:02:06 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-08-24 15:02:06 +0800
commitc2624dd1a071ea4388df23400f4319e863d061c6 (patch)
tree735b906379235cab1e945e587bb3acce5e39ff61
parent803e696cdc2a2f60d6097f1ff1efa8202d8e4320 (diff)
downloadtangerine-wallet-browser-c2624dd1a071ea4388df23400f4319e863d061c6.tar
tangerine-wallet-browser-c2624dd1a071ea4388df23400f4319e863d061c6.tar.gz
tangerine-wallet-browser-c2624dd1a071ea4388df23400f4319e863d061c6.tar.bz2
tangerine-wallet-browser-c2624dd1a071ea4388df23400f4319e863d061c6.tar.lz
tangerine-wallet-browser-c2624dd1a071ea4388df23400f4319e863d061c6.tar.xz
tangerine-wallet-browser-c2624dd1a071ea4388df23400f4319e863d061c6.tar.zst
tangerine-wallet-browser-c2624dd1a071ea4388df23400f4319e863d061c6.zip
fall back to `latest` if blockNumber is null
-rw-r--r--app/scripts/lib/nonce-tracker.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/scripts/lib/nonce-tracker.js b/app/scripts/lib/nonce-tracker.js
index 08f1e1e86..0029ac953 100644
--- a/app/scripts/lib/nonce-tracker.js
+++ b/app/scripts/lib/nonce-tracker.js
@@ -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 }