Merge pull request #562 from matiu/feature/txbuilder-utxos
serialize only the list of selected utxos, if available
This commit is contained in:
commit
3e43d79b6e
@ -821,10 +821,12 @@ TransactionBuilder.prototype.build = function() {
|
|||||||
//
|
//
|
||||||
TransactionBuilder.prototype.toObj = function() {
|
TransactionBuilder.prototype.toObj = function() {
|
||||||
|
|
||||||
|
var utxos = this.selectedUtxos && this.selectedUtxos[0] ? this.selectedUtxos : JSON.parse(this.vanilla.utxos);
|
||||||
|
|
||||||
var ret = {
|
var ret = {
|
||||||
version: TOOBJ_VERSION,
|
version: TOOBJ_VERSION,
|
||||||
outs: JSON.parse(this.vanilla.outs),
|
outs: JSON.parse(this.vanilla.outs),
|
||||||
utxos: JSON.parse(this.vanilla.utxos),
|
utxos: utxos,
|
||||||
opts: JSON.parse(this.vanilla.opts),
|
opts: JSON.parse(this.vanilla.opts),
|
||||||
scriptSig: this.vanilla.scriptSig,
|
scriptSig: this.vanilla.scriptSig,
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user