send change to last address of the input list
This commit is contained in:
@@ -769,8 +769,8 @@ class Wallet:
|
|||||||
raise ValueError("Not enough funds")
|
raise ValueError("Not enough funds")
|
||||||
|
|
||||||
if not self.use_change and not change_addr:
|
if not self.use_change and not change_addr:
|
||||||
change_addr = inputs[0][0]
|
change_addr = inputs[-1][0]
|
||||||
print "Sending change to", change_addr
|
print_error( "Sending change to", change_addr )
|
||||||
|
|
||||||
outputs = self.choose_tx_outputs( to_address, amount, fee, total, change_addr )
|
outputs = self.choose_tx_outputs( to_address, amount, fee, total, change_addr )
|
||||||
s_inputs = self.sign_inputs( inputs, outputs, password )
|
s_inputs = self.sign_inputs( inputs, outputs, password )
|
||||||
|
|||||||
Reference in New Issue
Block a user