Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dev0xstar committed Jun 26, 2024
1 parent c30ad36 commit 36b36f3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions stable-swap-client/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,23 @@ pub fn pause(swap_pubkey: &Pubkey, admin_pubkey: &Pubkey) -> Result<Instruction,
accounts,
data,
})
}

/// Creates a 'unpause' instruction
pub fn unpause(swap_pubkey: &Pubkey, admin_pubkey: &Pubkey) -> Result<Instruction, ProgramError> {
let data = AdminInstruction::Unpause.pack();

let accounts = vec![
AccountMeta::new(*swap_pubkey, false),
AccountMeta::new_readonly(*admin_pubkey, true),
];

Ok(Instruction {
program_id: crate::ID,
accounts,
data,
})
}

/// Creates a 'apply_new_admin' instruction
pub fn apply_new_admin(
Expand Down

0 comments on commit 36b36f3

Please sign in to comment.