Made TransactionOut take numbers as input

This commit is contained in:
vub 2013-10-08 07:38:22 -04:00
parent b41a4ecb91
commit 8fb725f796
2 changed files with 3 additions and 3 deletions

2
bitcoinjs-min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -554,8 +554,8 @@ var TransactionOut = function (data)
if (util.isArray(data.value)) {
this.value = data.value;
} else if ("string" == typeof data.value) {
var valueHex = (new BigInteger(data.value, 10)).toString(16);
} else if ("string" == typeof data.value || "number" == typeof data.value) {
var valueHex = (new BigInteger(""+data.value, 10)).toString(16);
while (valueHex.length < 16) valueHex = "0" + valueHex;
this.value = conv.hexToBytes(valueHex);
}