aboutsummaryrefslogtreecommitdiffstats
path: root/jsre
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-08-07 18:33:12 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-08-07 18:33:12 +0800
commita33726b7db98fcb754c6d9d96538ce21cfc35f9a (patch)
treed56f3876aa9930000ed73f28a3b4b2d3ef1f1996 /jsre
parentac10c9352e053a06a69fad634e9ec6624ee5808d (diff)
downloaddexon-a33726b7db98fcb754c6d9d96538ce21cfc35f9a.tar
dexon-a33726b7db98fcb754c6d9d96538ce21cfc35f9a.tar.gz
dexon-a33726b7db98fcb754c6d9d96538ce21cfc35f9a.tar.bz2
dexon-a33726b7db98fcb754c6d9d96538ce21cfc35f9a.tar.lz
dexon-a33726b7db98fcb754c6d9d96538ce21cfc35f9a.tar.xz
dexon-a33726b7db98fcb754c6d9d96538ce21cfc35f9a.tar.zst
dexon-a33726b7db98fcb754c6d9d96538ce21cfc35f9a.zip
web3: regression. Fixes #1613
Diffstat (limited to 'jsre')
-rw-r--r--jsre/ethereum_js.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/jsre/ethereum_js.go b/jsre/ethereum_js.go
index 27dbed24c..012e5af70 100644
--- a/jsre/ethereum_js.go
+++ b/jsre/ethereum_js.go
@@ -1137,10 +1137,10 @@ var toHex = function (val) {
if (isString(val)) {
if (val.indexOf('-0x') === 0)
return fromDecimal(val);
- else if (!isFinite(val))
- return fromAscii(val);
else if(val.indexOf('0x') === 0)
return val;
+ else if (!isFinite(val))
+ return fromAscii(val);
}
return fromDecimal(val);