Add "client" feature annoations
This commit is contained in:
parent
6a77a5c349
commit
18857c7b72
|
@ -15,7 +15,7 @@ no-idl = []
|
|||
no-log-ix-name = []
|
||||
cpi = ["no-entrypoint"]
|
||||
default = []
|
||||
test-bpf = []
|
||||
test-bpf = ["client"]
|
||||
client = ["solana-sdk"]
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -609,6 +609,7 @@ impl HealthCache {
|
|||
/// - MAX if liabs = 0
|
||||
///
|
||||
/// Maybe talking about the collateralization ratio assets/liabs is more intuitive?
|
||||
#[cfg(feature = "client")]
|
||||
pub fn health_ratio(&self, health_type: HealthType) -> I80F48 {
|
||||
let (assets, liabs) = self.health_assets_and_liabs(health_type);
|
||||
let hundred = I80F48::from(100);
|
||||
|
@ -623,6 +624,7 @@ impl HealthCache {
|
|||
/// above the min_ratio health ratio.
|
||||
///
|
||||
/// TODO: Add slippage/fees.
|
||||
#[cfg(feature = "client")]
|
||||
pub fn max_swap_source_for_health_ratio(
|
||||
&self,
|
||||
source: TokenIndex,
|
||||
|
|
|
@ -70,6 +70,7 @@ impl TokenPosition {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
pub fn ui(&self, bank: &Bank) -> I80F48 {
|
||||
if self.indexed_position.is_positive() {
|
||||
(self.indexed_position * bank.deposit_index)
|
||||
|
|
Loading…
Reference in New Issue