aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/hex-to-bn.js
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2018-04-20 02:49:11 +0800
committerfrankiebee <frankie.diamond@gmail.com>2018-04-20 02:49:11 +0800
commitc20c97ce625207c7afcd48a12f6e7891d582ae99 (patch)
treeb5e063ee7cfd0d0e99fcdb0409fe3106c010bf79 /app/scripts/lib/hex-to-bn.js
parenteeb9390de81ce6fc92247d5c499e991dce8330bd (diff)
parent00efcf9e8ba34d448b628c98d32ad12d5be2ffc9 (diff)
downloadtangerine-wallet-browser-c20c97ce625207c7afcd48a12f6e7891d582ae99.tar.gz
tangerine-wallet-browser-c20c97ce625207c7afcd48a12f6e7891d582ae99.tar.zst
tangerine-wallet-browser-c20c97ce625207c7afcd48a12f6e7891d582ae99.zip
Merge branch 'master' into tx-controller-rewrite-v3
Diffstat (limited to 'app/scripts/lib/hex-to-bn.js')
-rw-r--r--app/scripts/lib/hex-to-bn.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/scripts/lib/hex-to-bn.js b/app/scripts/lib/hex-to-bn.js
index 184217279..b28746920 100644
--- a/app/scripts/lib/hex-to-bn.js
+++ b/app/scripts/lib/hex-to-bn.js
@@ -1,6 +1,11 @@
-const ethUtil = require('ethereumjs-util')
+const ethUtil = (/** @type {object} */ (require('ethereumjs-util')))
const BN = ethUtil.BN
+/**
+ * Returns a [BinaryNumber]{@link BN} representation of the given hex value
+ * @param {string} hex
+ * @return {any}
+ */
module.exports = function hexToBn (hex) {
return new BN(ethUtil.stripHexPrefix(hex), 16)
}