This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
token/program-2022/src/extension/confidential_transfer Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -1164,13 +1164,20 @@ pub(crate) fn process_instruction(
11641164 }
11651165 ConfidentialTransferInstruction :: TransferWithFee => {
11661166 msg ! ( "ConfidentialTransferInstruction::TransferWithFee" ) ;
1167- let data = decode_instruction_data :: < TransferWithFeeInstructionData > ( input) ?;
1168- process_transfer (
1169- program_id,
1170- accounts,
1171- data. new_source_decryptable_available_balance ,
1172- data. proof_instruction_offset as i64 ,
1173- )
1167+ #[ cfg( feature = "zk-ops" ) ]
1168+ {
1169+ let data = decode_instruction_data :: < TransferWithFeeInstructionData > ( input) ?;
1170+ process_transfer (
1171+ program_id,
1172+ accounts,
1173+ data. new_source_decryptable_available_balance ,
1174+ data. proof_instruction_offset as i64 ,
1175+ )
1176+ }
1177+ #[ cfg( not( feature = "zk-ops" ) ) ]
1178+ {
1179+ Err ( ProgramError :: InvalidInstructionData )
1180+ }
11741181 }
11751182 ConfidentialTransferInstruction :: ApplyPendingBalance => {
11761183 msg ! ( "ConfidentialTransferInstruction::ApplyPendingBalance" ) ;
You can’t perform that action at this time.
0 commit comments