Browse Source

Made TransactionOut take numbers as input

hk-custom-address
vub 11 years ago
parent
commit
8fb725f796
  1. 2
      bitcoinjs-min.js
  2. 4
      src/transaction.js

2
bitcoinjs-min.js

File diff suppressed because one or more lines are too long

4
src/transaction.js

@ -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);
}

Loading…
Cancel
Save