send change to last address of the input list

This commit is contained in:
thomasv 2012-11-26 15:08:35 +01:00
parent 76af3959bf
commit e87ed44f84
1 changed files with 2 additions and 2 deletions

View File

@ -769,8 +769,8 @@ class Wallet:
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 )