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

Commit

Permalink
Add feature-wrapping for new ConfidentialTransferInstruction::Transfe…
Browse files Browse the repository at this point in the history
…rWithFee (#3116)
  • Loading branch information
Tyera Eulberg authored Apr 26, 2022
1 parent b3fe5b6 commit 51ece68
Showing 1 changed file with 14 additions and 7 deletions.
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

0 comments on commit 51ece68

Please sign in to comment.