get network from first output when multiple outputs in proposal

This commit is contained in:
Gregg Zigler 2015-07-09 12:02:04 -07:00
parent a6f2b70ef2
commit bc565f671a
1 changed files with 2 additions and 1 deletions

View File

@ -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() {