get network from first output when multiple outputs in proposal
This commit is contained in:
parent
a6f2b70ef2
commit
bc565f671a
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue