Commit 80d105d1 authored by Moul's avatar Moul

[fix] #151, #83: tx: intermediaries tx sent to the wrong recipient.

- Change recipient for intermediaries tx to the issuer pubkey.
- Handle loop for multi and single recipients tx according to the type of the
recipient.
parent 3dc2dd97
......@@ -180,7 +180,7 @@ def generate_and_send_transaction(
issuers,
totalAmountInput,
listinput_and_amount,
outputAddresses,
issuers,
"Change operation",
)
transaction += sign_document_from_seed(transaction, seed) + "\n"
......@@ -251,8 +251,11 @@ def generate_transaction_document(
################
listoutput = []
# Outputs to receiver (if not himself)
for outputAddress in outputAddresses:
if isinstance(outputAddresses, str):
generate_output(listoutput, curentUnitBase, AmountTransfered, outputAddresses)
else:
for outputAddress in outputAddresses:
generate_output(listoutput, curentUnitBase, AmountTransfered, outputAddress)
# Outputs to himself
rest = totalAmountInput - totalAmountTransfered
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment