Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Add feature-wrapping for new ConfidentialTransferInstruction::TransferWithFee #3116

Merged
merged 1 commit into from
Apr 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1164,13 +1164,20 @@ pub(crate) fn process_instruction(
}
ConfidentialTransferInstruction::TransferWithFee => {
msg!("ConfidentialTransferInstruction::TransferWithFee");
let data = decode_instruction_data::<TransferWithFeeInstructionData>(input)?;
process_transfer(
program_id,
accounts,
data.new_source_decryptable_available_balance,
data.proof_instruction_offset as i64,
)
#[cfg(feature = "zk-ops")]
{
let data = decode_instruction_data::<TransferWithFeeInstructionData>(input)?;
process_transfer(
program_id,
accounts,
data.new_source_decryptable_available_balance,
data.proof_instruction_offset as i64,
)
}
#[cfg(not(feature = "zk-ops"))]
{
Err(ProgramError::InvalidInstructionData)
}
}
ConfidentialTransferInstruction::ApplyPendingBalance => {
msg!("ConfidentialTransferInstruction::ApplyPendingBalance");
Expand Down