From 5794883eb0ef80be81f7cd5676cbaa7803e9dd17 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Mon, 16 Nov 2015 18:39:51 -0300 Subject: [PATCH] allow either script or toAddress --- lib/model/txproposal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/model/txproposal.js b/lib/model/txproposal.js index ee6896a..37b5e62 100644 --- a/lib/model/txproposal.js +++ b/lib/model/txproposal.js @@ -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,