Skip to content

Commit

Permalink
send change to last address of the input list
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasv committed Nov 26, 2012
1 parent 76af395 commit e87ed44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ def mktx(self, to_address, amount, label, password, fee=None, change_addr=None,
raise ValueError("Not enough funds")

if not self.use_change and not change_addr:
change_addr = inputs[0][0]
print "Sending change to", change_addr
change_addr = inputs[-1][0]
print_error( "Sending change to", change_addr )

outputs = self.choose_tx_outputs( to_address, amount, fee, total, change_addr )
s_inputs = self.sign_inputs( inputs, outputs, password )
Expand Down

0 comments on commit e87ed44

Please sign in to comment.