allow either script or toAddress
This commit is contained in:
parent
d8f2bf7684
commit
5794883eb0
|
@ -171,7 +171,7 @@ TxProposal.prototype._buildTx = function() {
|
|||
t.to(self.toAddress, self.amount);
|
||||
} else if (self.outputs) {
|
||||
_.each(self.outputs, function(o) {
|
||||
$.checkState(!o.script != !o.toAddress, 'Output should have either toAddress or script specified');
|
||||
$.checkState(o.script || o.toAddress, 'Output should have either toAddress or script specified');
|
||||
if (o.script) {
|
||||
t.addOutput(new Bitcore.Transaction.Output({
|
||||
script: o.script,
|
||||
|
|
Loading…
Reference in New Issue