aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-08-24 12:37:07 +0800
committerDan Finlay <dan@danfinlay.com>2017-08-24 12:37:07 +0800
commita122ec1f8ba0935d26a45ce0b26be991d222aaad (patch)
treeb5b710670da9e1e973ac715aa2cef6fa5d627c08 /app
parent55c1a259b1ac01e8a8f6b241bac7a3b1cd16f3ec (diff)
downloadtangerine-wallet-browser-a122ec1f8ba0935d26a45ce0b26be991d222aaad.tar
tangerine-wallet-browser-a122ec1f8ba0935d26a45ce0b26be991d222aaad.tar.gz
tangerine-wallet-browser-a122ec1f8ba0935d26a45ce0b26be991d222aaad.tar.bz2
tangerine-wallet-browser-a122ec1f8ba0935d26a45ce0b26be991d222aaad.tar.lz
tangerine-wallet-browser-a122ec1f8ba0935d26a45ce0b26be991d222aaad.tar.xz
tangerine-wallet-browser-a122ec1f8ba0935d26a45ce0b26be991d222aaad.tar.zst
tangerine-wallet-browser-a122ec1f8ba0935d26a45ce0b26be991d222aaad.zip
Use toNumber method
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/nonce-tracker.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/scripts/lib/nonce-tracker.js b/app/scripts/lib/nonce-tracker.js
index d49c7f205..e0e065d82 100644
--- a/app/scripts/lib/nonce-tracker.js
+++ b/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 }