mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-08-05 13:26:57 +00:00
multisig: allow mismatched change addresses, show them as non-change
This commit is contained in:
parent
4343d0eaeb
commit
261b8d5e41
@ -510,14 +510,11 @@ static bool signing_check_output(TxOutputType *txoutput) {
|
|||||||
}
|
}
|
||||||
if (txoutput->script_type == OutputScriptType_PAYTOMULTISIG) {
|
if (txoutput->script_type == OutputScriptType_PAYTOMULTISIG) {
|
||||||
uint8_t h[32];
|
uint8_t h[32];
|
||||||
if (!multisig_fp_set || multisig_fp_mismatch
|
if (multisig_fp_set && !multisig_fp_mismatch
|
||||||
|| cryptoMultisigFingerprint(&(txoutput->multisig), h) == 0
|
&& cryptoMultisigFingerprint(&(txoutput->multisig), h)
|
||||||
|| memcmp(multisig_fp, h, 32) != 0) {
|
&& memcmp(multisig_fp, h, 32) == 0) {
|
||||||
fsm_sendFailure(FailureType_Failure_Other, "Invalid multisig change address");
|
is_change = check_change_bip32_path(txoutput);
|
||||||
signing_abort();
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
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
|
|| ((txoutput->script_type == OutputScriptType_PAYTOWITNESS
|
||||||
|| txoutput->script_type == OutputScriptType_PAYTOP2SHWITNESS)
|
|| txoutput->script_type == OutputScriptType_PAYTOP2SHWITNESS)
|
||||||
|
Loading…
Reference in New Issue
Block a user