Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-neon committed Jun 4, 2024
1 parent 955e49c commit d3839ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions transfer-sol/program/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion transfer-tokens/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d3839ad

Please sign in to comment.