1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-22 21:30:56 +00:00

signing/multisig: fix pubkey index lookup

This commit is contained in:
Jan Pochyla 2018-02-23 19:55:07 +01:00
parent b98171e273
commit 1b64088957

View File

@ -345,7 +345,7 @@ async def sign_tx(tx: SignTx, root):
signature = ecdsa_sign(key_sign, bip143_hash)
if txi.multisig:
# find out place of our signature based on the pubkey
signature_index = multisig_pubkey_index(txi_sign.multisig, key_sign_pub)
signature_index = multisig_pubkey_index(txi.multisig, key_sign_pub)
witness = get_p2wsh_witness(txi.multisig, signature, signature_index, get_hash_type(coin))
else:
witness = get_p2wpkh_witness(signature, key_sign_pub, get_hash_type(coin))