|
|
@ -96,20 +96,20 @@ Transaction.prototype.addOutput = function (address, value, network) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (arguments[0].indexOf(':') >= 0) { |
|
|
|
network = value |
|
|
|
|
|
|
|
var args = arguments[0].split(':') |
|
|
|
address = args[0] |
|
|
|
value = parseInt(args[1]) |
|
|
|
} |
|
|
|
if (typeof address === 'string') { |
|
|
|
if (arguments[0].indexOf(':') >= 0) { |
|
|
|
var args = arguments[0].split(':') |
|
|
|
address = args[0] |
|
|
|
value = parseInt(args[1]) |
|
|
|
|
|
|
|
network = network || Network.bitcoin |
|
|
|
network = arguments[1] |
|
|
|
} |
|
|
|
|
|
|
|
if (typeof address === 'string') { |
|
|
|
address = Address.fromBase58Check(address) |
|
|
|
} |
|
|
|
|
|
|
|
network = network || Network.bitcoin |
|
|
|
|
|
|
|
this.outs.push(new TransactionOut({ |
|
|
|
value: value, |
|
|
|
script: Script.createOutputScript(address, network) |
|
|
|