1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 04:18:10 +00:00

refactor signing_check_output

This commit is contained in:
Pavol Rusnak 2017-05-13 00:45:11 +02:00
parent 06304c2378
commit 49f44d296c
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -515,10 +515,11 @@ static bool signing_check_output(TxOutputType *txoutput) {
&& memcmp(multisig_fp, h, 32) == 0) { && memcmp(multisig_fp, h, 32) == 0) {
is_change = check_change_bip32_path(txoutput); is_change = check_change_bip32_path(txoutput);
} }
} else if (txoutput->script_type == OutputScriptType_PAYTOADDRESS } else if (txoutput->script_type == OutputScriptType_PAYTOADDRESS) {
|| ((txoutput->script_type == OutputScriptType_PAYTOWITNESS is_change = check_change_bip32_path(txoutput);
|| txoutput->script_type == OutputScriptType_PAYTOP2SHWITNESS) } else if (txoutput->script_type == OutputScriptType_PAYTOWITNESS && txoutput->amount < segwit_to_spend) {
&& txoutput->amount < segwit_to_spend)) { is_change = check_change_bip32_path(txoutput);
} else if (txoutput->script_type == OutputScriptType_PAYTOP2SHWITNESS && txoutput->amount < segwit_to_spend) {
is_change = check_change_bip32_path(txoutput); is_change = check_change_bip32_path(txoutput);
} }
} }