From bc565f671ac5bdde15e19a78498154d3f8855c05 Mon Sep 17 00:00:00 2001 From: Gregg Zigler Date: Thu, 9 Jul 2015 12:02:04 -0700 Subject: [PATCH] get network from first output when multiple outputs in proposal --- lib/model/txproposal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/model/txproposal.js b/lib/model/txproposal.js index 8fdf320..d822ca1 100644 --- a/lib/model/txproposal.js +++ b/lib/model/txproposal.js @@ -157,7 +157,8 @@ TxProposal.prototype.getBitcoreTx = function() { }; TxProposal.prototype.getNetworkName = function() { - return Bitcore.Address(this.toAddress).toObject().network; + var someAddress = this.toAddress || this.outputs[0].toAddress; + return Bitcore.Address(someAddress).toObject().network; }; TxProposal.prototype.getRawTx = function() {