Skip to content

Commit

Permalink
remove unneccessary account from manager_crank_profit_share
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Aug 9, 2023
1 parent 49935e5 commit 5a42612
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use crate::constraints::{is_manager_for_vault, is_user_for_vault, is_user_stats_for_vault};
use crate::constraints::{
is_delegate_for_vault, is_manager_for_vault, is_user_for_vault, is_user_stats_for_vault,
is_vault_for_vault_depositor,
};
use crate::{Vault, VaultDepositor};

use crate::AccountMapProvider;
Expand Down Expand Up @@ -34,16 +37,14 @@ pub fn manager_crank_profit_share(ctx: Context<ManagerCrankProfitShare>) -> Resu
pub struct ManagerCrankProfitShare<'info> {
#[account(
mut,
constraint = is_manager_for_vault(&vault, &manager)?
constraint = is_manager_for_vault(&vault, &manager)? || is_delegate_for_vault(&vault, &manager)?
)]
pub vault: AccountLoader<'info, Vault>,
#[account(
mut,
seeds = [b"vault_depositor", vault.key().as_ref(), vault_depositor_authority.key().as_ref()],
bump,
constraint = is_vault_for_vault_depositor(&vault_depositor, &vault)?
)]
pub vault_depositor: AccountLoader<'info, VaultDepositor>,
pub vault_depositor_authority: AccountInfo<'info>,
pub manager: Signer<'info>,
#[account(
mut,
Expand Down

0 comments on commit 5a42612

Please sign in to comment.