aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-07-27 01:16:08 +0800
committerkumavis <aaron@kumavis.me>2017-07-27 01:16:08 +0800
commit39d28922de31fa26b50eca5c7719ae9feefae770 (patch)
tree0fbd81694db60c5f89bd3e6b6e51e7493ea67e2a /app
parentf16802e2d4f7e917e894e3ec38a716255f6b0942 (diff)
downloadtangerine-wallet-browser-39d28922de31fa26b50eca5c7719ae9feefae770.tar
tangerine-wallet-browser-39d28922de31fa26b50eca5c7719ae9feefae770.tar.gz
tangerine-wallet-browser-39d28922de31fa26b50eca5c7719ae9feefae770.tar.bz2
tangerine-wallet-browser-39d28922de31fa26b50eca5c7719ae9feefae770.tar.lz
tangerine-wallet-browser-39d28922de31fa26b50eca5c7719ae9feefae770.tar.xz
tangerine-wallet-browser-39d28922de31fa26b50eca5c7719ae9feefae770.tar.zst
tangerine-wallet-browser-39d28922de31fa26b50eca5c7719ae9feefae770.zip
nonce-tracker - validation - add validation failing value type to error message
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/nonce-tracker.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/scripts/lib/nonce-tracker.js b/app/scripts/lib/nonce-tracker.js
index 4bba1f1a8..81b500550 100644
--- a/app/scripts/lib/nonce-tracker.js
+++ b/app/scripts/lib/nonce-tracker.js
@@ -31,12 +31,12 @@ class NonceTracker {
const currentBlock = await this._getCurrentBlock()
const pendingTransactions = this.getPendingTransactions(address)
const pendingCount = pendingTransactions.length
- assert(Number.isInteger(pendingCount), `nonce-tracker - pendingCount is not an integer - got: "${pendingCount}"`)
+ assert(Number.isInteger(pendingCount), `nonce-tracker - pendingCount is not an integer - got: (${typeof pendingCount}) "${pendingCount}"`)
const baseCountHex = await this._getTxCount(address, currentBlock)
const baseCount = parseInt(baseCountHex, 16)
- assert(Number.isInteger(baseCount), `nonce-tracker - baseCount is not an integer - got: "${baseCount}"`)
+ assert(Number.isInteger(baseCount), `nonce-tracker - baseCount is not an integer - got: (${typeof baseCount}) "${baseCount}"`)
const nextNonce = baseCount + pendingCount
- assert(Number.isInteger(nextNonce), `nonce-tracker - nextNonce is not an integer - got: "${nextNonce}"`)
+ assert(Number.isInteger(nextNonce), `nonce-tracker - nextNonce is not an integer - got: (${typeof nextNonce}) "${nextNonce}"`)
// return next nonce and release cb
return { nextNonce, releaseLock }
}