mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-23 22:08:05 +00:00
fix
This commit is contained in:
@@ -196,6 +196,13 @@ impl BondingCurveAccount {
|
||||
// Return total including fee, converting back to u64
|
||||
(total_sell_value + fee) as u64
|
||||
}
|
||||
|
||||
pub fn get_token_price(&self) -> f64 {
|
||||
let v_sol = self.virtual_sol_reserves as f64 / 100_000_000.0;
|
||||
let v_tokens = self.virtual_token_reserves as f64 / 100_000.0;
|
||||
let token_price = v_sol / v_tokens;
|
||||
token_price
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user