Skip to content

Commit

Permalink
Getting Rid of valueOf as it only supports up to uint32
Browse files Browse the repository at this point in the history
  • Loading branch information
sidazhang committed Feb 11, 2014
1 parent d27f9f3 commit 5daede0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ Transaction.prototype.addOutput = function(address, value) {
address = new Address(address);
}
if ("number" == typeof value) {
value = BigInteger.valueOf(value);
value = BigInteger(value.toString(), 10);
}

if ("string" == typeof value) {
value = BigInteger(value, 10);
}

if (value instanceof BigInteger) {
Expand Down

0 comments on commit 5daede0

Please sign in to comment.