File tree Expand file tree Collapse file tree
core/src/apps/wallet/sign_tx Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -790,6 +790,13 @@ def output_is_change(
790790 segwit_in : int ,
791791 multifp : multisig .MultisigFingerprint ,
792792) -> bool :
793+ if o .script_type not in (
794+ OutputScriptType .PAYTOADDRESS ,
795+ OutputScriptType .PAYTOMULTISIG ,
796+ OutputScriptType .PAYTOWITNESS ,
797+ OutputScriptType .PAYTOP2SHWITNESS ,
798+ ):
799+ return False
793800 if o .multisig and not multifp .matches (o .multisig ):
794801 return False
795802 if output_is_segwit (o ) and o .amount > segwit_in :
Original file line number Diff line number Diff line change @@ -696,6 +696,13 @@ static bool signing_check_output(TxOutputType *txoutput) {
696696 }
697697 }
698698
699+ if ((txoutput -> script_type != OutputScriptType_PAYTOADDRESS ) &&
700+ (txoutput -> script_type != OutputScriptType_PAYTOMULTISIG ) &&
701+ (txoutput -> script_type != OutputScriptType_PAYTOWITNESS ) &&
702+ (txoutput -> script_type != OutputScriptType_PAYTOP2SHWITNESS )) {
703+ is_change = false;
704+ }
705+
699706 if (is_change ) {
700707 if (change_spend == 0 ) { // not set
701708 change_spend = txoutput -> amount ;
You can’t perform that action at this time.
0 commit comments