Comparing version 0.2.4 to 0.2.5
19
index.js
@@ -85,2 +85,14 @@ /** | ||
unfork: function (forked) { | ||
if (forked !== null && forked !== undefined) { | ||
var unforked = this.bignum(forked); | ||
var superforked = unforked.plus(this.constants.MOD); | ||
if (superforked.gte(this.constants.BYTES_32) && superforked.lt(this.constants.MOD)) { | ||
unforked = superforked; | ||
} | ||
if (forked.constructor === BigNumber) return unforked; | ||
return this.pad_left(unforked.toString(16)); | ||
} | ||
}, | ||
hex: function (n, nowrap) { | ||
@@ -97,3 +109,3 @@ var h; | ||
case Array: | ||
h = this.bignum(n, "hex"); | ||
h = this.bignum(n, "hex", nowrap); | ||
break; | ||
@@ -122,3 +134,3 @@ case BigNumber: | ||
default: | ||
h = this.bignum(n, "hex"); | ||
h = this.bignum(n, "hex", nowrap); | ||
} | ||
@@ -219,3 +231,2 @@ } | ||
} else { | ||
// console.log("Couldn't convert Number", n.toString(), "to BigNumber"); | ||
return n; | ||
@@ -233,3 +244,2 @@ } | ||
} else { | ||
// console.log("Couldn't convert String", n.toString(), "to BigNumber"); | ||
return n; | ||
@@ -253,3 +263,2 @@ } | ||
} catch (exc) { | ||
// console.log("Couldn't convert", n.toString(), "to BigNumber"); | ||
return n; | ||
@@ -256,0 +265,0 @@ } |
{ | ||
"name": "augur-abi", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "Contract ABI serialization", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1067796
21430