|
@ -239,6 +239,7 @@ Transaction.prototype.toObject = function toObject() { |
|
|
}); |
|
|
}); |
|
|
return { |
|
|
return { |
|
|
change: this._change ? this._change.toString() : undefined, |
|
|
change: this._change ? this._change.toString() : undefined, |
|
|
|
|
|
fee: this._fee ? this._fee : undefined, |
|
|
version: this.version, |
|
|
version: this.version, |
|
|
inputs: inputs, |
|
|
inputs: inputs, |
|
|
outputs: outputs, |
|
|
outputs: outputs, |
|
@ -269,6 +270,9 @@ Transaction.prototype.fromObject = function(transaction) { |
|
|
if (transaction.change) { |
|
|
if (transaction.change) { |
|
|
this.change(transaction.change); |
|
|
this.change(transaction.change); |
|
|
} |
|
|
} |
|
|
|
|
|
if (transaction.fee) { |
|
|
|
|
|
this.fee(transaction.fee); |
|
|
|
|
|
} |
|
|
this.nLockTime = transaction.nLockTime; |
|
|
this.nLockTime = transaction.nLockTime; |
|
|
this.version = transaction.version; |
|
|
this.version = transaction.version; |
|
|
}; |
|
|
}; |
|
|