From e71b51046ddedc0f1d7c2e749398f846fbfdef34 Mon Sep 17 00:00:00 2001 From: Tomas Susanka Date: Tue, 13 Feb 2018 12:23:41 +0100 Subject: [PATCH] signing/multisig: fingerprint is calculated everytime multisig is present --- src/apps/wallet/sign_tx/signing.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/apps/wallet/sign_tx/signing.py b/src/apps/wallet/sign_tx/signing.py index 24b8a1768f..8e27855aed 100644 --- a/src/apps/wallet/sign_tx/signing.py +++ b/src/apps/wallet/sign_tx/signing.py @@ -76,6 +76,13 @@ async def check_tx_fee(tx: SignTx, root): bip143.add_prevouts(txi) # all inputs are included (non-segwit as well) bip143.add_sequence(txi) + if txi.multisig: + fp = multisig_fingerprint(txi.multisig) + if not len(multisig_fp): + multisig_fp = fp + elif multisig_fp != fp: + multisig_fp_mismatch = True + if coin.force_bip143: is_bip143 = (txi.script_type == InputScriptType.SPENDADDRESS) if not is_bip143: @@ -103,12 +110,6 @@ async def check_tx_fee(tx: SignTx, root): segwit[i] = False total_in += await get_prevtx_output_value( tx_req, txi.prev_hash, txi.prev_index) - if txi.multisig: - fp = multisig_fingerprint(txi.multisig) - if not len(multisig_fp): - multisig_fp = fp - elif multisig_fp != fp: - multisig_fp_mismatch = True else: raise SigningError(FailureType.DataError,