diff --git a/lib/TransactionBuilder.js b/lib/TransactionBuilder.js index fb50d48..b1f1ca6 100644 --- a/lib/TransactionBuilder.js +++ b/lib/TransactionBuilder.js @@ -821,10 +821,12 @@ TransactionBuilder.prototype.build = function() { // TransactionBuilder.prototype.toObj = function() { + var utxos = this.selectedUtxos && this.selectedUtxos[0] ? this.selectedUtxos : JSON.parse(this.vanilla.utxos); + var ret = { version: TOOBJ_VERSION, outs: JSON.parse(this.vanilla.outs), - utxos: JSON.parse(this.vanilla.utxos), + utxos: utxos, opts: JSON.parse(this.vanilla.opts), scriptSig: this.vanilla.scriptSig, };