From d3839ad75d42ecd9c13e7ecd14096f41ccf2308c Mon Sep 17 00:00:00 2001 From: Andrei Neon Labs <169074588+andrei-neon@users.noreply.github.com> Date: Tue, 4 Jun 2024 17:57:38 +0200 Subject: [PATCH] fix --- transfer-sol/program/src/processor.rs | 4 ++++ transfer-tokens/src/processor.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/transfer-sol/program/src/processor.rs b/transfer-sol/program/src/processor.rs index 20f673e..90d3117 100644 --- a/transfer-sol/program/src/processor.rs +++ b/transfer-sol/program/src/processor.rs @@ -15,6 +15,10 @@ pub fn process_instruction( accounts: &[AccountInfo], input: &[u8], ) -> ProgramResult { + // Set return data to the integer value which is 1u8; 8 bytes long + let return_data = [1u8; 8]; + set_return_data(&return_data); + let instruction = TransferInstruction::try_from_slice(input)?; match instruction { TransferInstruction::CpiTransfer(args) => transfer_sol_with_cpi(accounts, args), diff --git a/transfer-tokens/src/processor.rs b/transfer-tokens/src/processor.rs index 0863149..bd19013 100644 --- a/transfer-tokens/src/processor.rs +++ b/transfer-tokens/src/processor.rs @@ -25,7 +25,7 @@ pub fn process_instruction( ) -> ProgramResult { // Create an iterator to safely reference accounts in the slice let account_info_iter = &mut accounts.iter(); - // Set return data to the integer value which is incrementing for each function call + // Set return data to the integer value which is 1u8; 8 bytes long let return_data = [1u8; 8]; set_return_data(&return_data); // As part of the program specification the instruction gives: