|
|
@ -49,6 +49,8 @@ function Transaction(serialized) { |
|
|
|
return Transaction.shallowCopy(serialized); |
|
|
|
} else if (util.isHexa(serialized)) { |
|
|
|
this.fromString(serialized); |
|
|
|
} else if (util.isValidJSON(serialized)) { |
|
|
|
this.fromJSON(serialized); |
|
|
|
} else if (bufferUtil.isBuffer(serialized)) { |
|
|
|
this.fromBuffer(serialized); |
|
|
|
} else if (_.isObject(serialized)) { |
|
|
@ -221,7 +223,7 @@ Transaction.prototype.toObject = function toObject() { |
|
|
|
outputs.push(output.toObject()); |
|
|
|
}); |
|
|
|
return { |
|
|
|
change: this._change ? this._change.toObject() : undefined, |
|
|
|
change: this._change ? this._change.toString() : undefined, |
|
|
|
version: this.version, |
|
|
|
inputs: inputs, |
|
|
|
outputs: outputs, |
|
|
|