Skip to content

Commit

Permalink
disable everything else than deposit sol when not ignoring limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
Arrowana committed Mar 14, 2024
1 parent 942aded commit 7ff1a53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stakedex_sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ impl Stakedex {
}

/// Creates all possible Amms from the underlying available Stakedexes
pub fn get_amms(self) -> Vec<Box<dyn Amm + Send + Sync>> {
pub fn get_amms(self, ignore_cpi_limitation: bool) -> Vec<Box<dyn Amm + Send + Sync>> {
#[derive(Clone)]
enum Stakedex {
SplStakePool(SplStakePoolStakedex),
Expand Down Expand Up @@ -479,6 +479,10 @@ impl Stakedex {
}
}

if !ignore_cpi_limitation {
return amms;
}

// SplStakePool WithdrawStake + DepositStake
// UnstakeIt DepositStake
// Marinade DepositStake
Expand Down

0 comments on commit 7ff1a53

Please sign in to comment.