Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 87129a9

Browse files
authored
Added positive tests in stake pool and fixed several bugs in instructions (#788)
* Added positive tests for withdraw, claim, set owner, set authority, several bugs fixed * Fixed PR comments * Fixed constant with leading zero * Deposit tests refactoring
1 parent 097abc3 commit 87129a9

File tree

2 files changed

+337
-69
lines changed

2 files changed

+337
-69
lines changed

stake-pool/program/src/instruction.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,8 @@ pub fn claim(
280280
pool_mint: &Pubkey,
281281
token_program_id: &Pubkey,
282282
stake_program_id: &Pubkey,
283-
amount: u64,
284283
) -> Result<Instruction, ProgramError> {
285-
let args = StakePoolInstruction::Withdraw(amount);
284+
let args = StakePoolInstruction::Claim;
286285
let data = args.serialize()?;
287286
let accounts = vec![
288287
AccountMeta::new(*stake_pool, false),
@@ -338,7 +337,7 @@ pub fn set_owner(
338337
stake_pool_new_owner: &Pubkey,
339338
stake_pool_new_fee_receiver: &Pubkey,
340339
) -> Result<Instruction, ProgramError> {
341-
let args = StakePoolInstruction::SetStakingAuthority;
340+
let args = StakePoolInstruction::SetOwner;
342341
let data = args.serialize()?;
343342
let accounts = vec![
344343
AccountMeta::new(*stake_pool, false),

0 commit comments

Comments
 (0)