Skip to content

Commit

Permalink
fmt, lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Swen committed Mar 26, 2024
1 parent cd1a2b8 commit c19be5e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion js/compressed-token/src/instructions/transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
defaultStaticAccountsStruct,
CompressedAccountWithMerkleContext,
LightSystemProgram,
CompressedAccount,
PackedCompressedAccountWithMerkleContext,
} from '@lightprotocol/stateless.js';
import {
Expand All @@ -19,6 +18,7 @@ import {
TokenTransferOutputData,
} from '../types';

/// TODO: refactor akin to lightsystemprogram.transfer()
export async function createTransferInstruction(
feePayer: PublicKey,
authority: PublicKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function padOutputStateMerkleTrees(
/// accounts, and fill up with 0th output state tree
} else {
/// Into array
let treesArray = toArray(outputStateMerkleTrees);
const treesArray = toArray(outputStateMerkleTrees);
if (treesArray.length >= numberOfOutputCompressedAccounts) {
return treesArray.slice(0, numberOfOutputCompressedAccounts);
} else {
Expand Down
1 change: 0 additions & 1 deletion programs/compressed-pda/src/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ pub struct InstructionDataTransfer {
pub relay_fee: Option<u64>,
}


// TODO: refactor to compressed_account
// #[derive(Debug)]
// #[account]
Expand Down
4 changes: 1 addition & 3 deletions programs/compressed-pda/src/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,7 @@ mod test {
let deserialized_instruction_data: InstructionDataTransfer =
InstructionDataTransfer::deserialize(
// &mut [vec![0u8; 8], instruction.data[12..].to_vec()]
&mut [instruction.data[12..].to_vec()]
.concat()
.as_slice(),
&mut [instruction.data[12..].to_vec()].concat().as_slice(),
)
.unwrap();
deserialized_instruction_data
Expand Down
2 changes: 1 addition & 1 deletion programs/compressed-token/src/process_transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub fn process_transfer<'a, 'b, 'c, 'info: 'b + 'c>(
inputs: Vec<u8>,
) -> Result<()> {
let mut inputs: CompressedTokenInstructionDataTransfer =
CompressedTokenInstructionDataTransfer::deserialize(&mut inputs.as_slice())?;
CompressedTokenInstructionDataTransfer::deserialize(&mut inputs.as_slice())?;

let is_delegate =
check_signer_or_delegate(&ctx.accounts.authority.key(), &inputs.input_token_data)?;
Expand Down

0 comments on commit c19be5e

Please sign in to comment.