Merge pull request #1614 from obscuren/web3-finite-fix

web3: regression. Fixes #1613
pull/1592/merge
Jeffrey Wilcke 9 years ago
commit b1fac4270d
  1. 4
      jsre/ethereum_js.go

@ -1137,10 +1137,10 @@ var toHex = function (val) {
if (isString(val)) { if (isString(val)) {
if (val.indexOf('-0x') === 0) if (val.indexOf('-0x') === 0)
return fromDecimal(val); return fromDecimal(val);
else if (!isFinite(val))
return fromAscii(val);
else if(val.indexOf('0x') === 0) else if(val.indexOf('0x') === 0)
return val; return val;
else if (!isFinite(val))
return fromAscii(val);
} }
return fromDecimal(val); return fromDecimal(val);

Loading…
Cancel
Save