always add changeaddress if specified

This commit is contained in:
Ivan Socolsky 2016-04-28 19:58:24 -03:00
parent c1347871f0
commit f455b53971
No known key found for this signature in database
GPG Key ID: FAECE6A05FAA4F56
1 changed files with 1 additions and 4 deletions

View File

@ -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);
}