diff options
Diffstat (limited to 'app/scripts/lib/hex-to-bn.js')
-rw-r--r-- | app/scripts/lib/hex-to-bn.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/scripts/lib/hex-to-bn.js b/app/scripts/lib/hex-to-bn.js new file mode 100644 index 000000000..184217279 --- /dev/null +++ b/app/scripts/lib/hex-to-bn.js @@ -0,0 +1,7 @@ +const ethUtil = require('ethereumjs-util') +const BN = ethUtil.BN + +module.exports = function hexToBn (hex) { + return new BN(ethUtil.stripHexPrefix(hex), 16) +} + |