gridplus-sdk
Advanced tools
Comparing version 0.7.16 to 0.7.17
{ | ||
"name": "gridplus-sdk", | ||
"version": "0.7.16", | ||
"version": "0.7.17", | ||
"description": "SDK to interact with GridPlus Lattice1 device", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -416,4 +416,6 @@ // Utils for Ethereum transactions. This is effecitvely a shim of ethereumjs-util, which | ||
// Otherwise try to get this converted to a hex string | ||
if (typeof x === 'number' || new BN(x).toString() === String(x)) { | ||
if (typeof x === 'number' || new BN(x).toString().slice(0, 15) === String(x).slice(0, 15)) { | ||
// If this is a number or a base-10 number string, convert it to hex | ||
// Note that the JS native `String()` loses precision for large numbers, but we only | ||
// want to validate the base of the number so we don't care about far out precision. | ||
x = `${new BN(x).toString(16)}`; | ||
@@ -420,0 +422,0 @@ } else if (typeof x === 'string' && x.slice(0, 2) === '0x') { |
101788
2305