allow either script or toAddress

This commit is contained in:
Ivan Socolsky 2015-11-16 18:39:51 -03:00
parent d8f2bf7684
commit 5794883eb0
1 changed files with 1 additions and 1 deletions

View File

@ -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,