Browse Source
always add changeaddress if specified
activeAddress
Ivan Socolsky
9 years ago
No known key found for this signature in database
GPG Key ID: FAECE6A05FAA4F56
1 changed files with
1 additions and
4 deletions
-
lib/model/txproposal.js
|
|
@ -164,10 +164,7 @@ TxProposal.prototype._buildTx = function() { |
|
|
|
|
|
|
|
t.fee(self.fee); |
|
|
|
|
|
|
|
var totalInputs = _.sum(self.inputs, 'satoshis'); |
|
|
|
var totalOutputs = _.sum(self.outputs, 'amount'); |
|
|
|
|
|
|
|
if (totalInputs - totalOutputs - self.fee > 0 && self.changeAddress) { |
|
|
|
if (self.changeAddress) { |
|
|
|
t.change(self.changeAddress.address); |
|
|
|
} |
|
|
|
|
|
|
|