From aa0d66b71a815e3073a40b82d19a3e41974361e4 Mon Sep 17 00:00:00 2001 From: Erwan Or Date: Wed, 10 Apr 2024 22:02:18 -0400 Subject: [PATCH] dex: don't expose dex engine internals --- .../component/dex/src/component/circuit_breaker/value.rs | 2 +- crates/core/component/dex/src/component/mod.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/core/component/dex/src/component/circuit_breaker/value.rs b/crates/core/component/dex/src/component/circuit_breaker/value.rs index 78441249d3..1ea141d5d4 100644 --- a/crates/core/component/dex/src/component/circuit_breaker/value.rs +++ b/crates/core/component/dex/src/component/circuit_breaker/value.rs @@ -228,7 +228,7 @@ mod tests { let position = buy_1; state_tx.index_position_by_price(&position, &position.id()); state_tx - .update_available_liquidity(&None, &position) + .update_asset_by_base_liquidity_index(&None, &position, &position.id()) .await .expect("able to update liquidity"); state_tx.put(state_key::position_by_id(&id), position); diff --git a/crates/core/component/dex/src/component/mod.rs b/crates/core/component/dex/src/component/mod.rs index 8a6459ee47..6e36ea8ead 100644 --- a/crates/core/component/dex/src/component/mod.rs +++ b/crates/core/component/dex/src/component/mod.rs @@ -11,16 +11,16 @@ mod arb; pub(crate) mod circuit_breaker; mod dex; mod flow; -pub(crate) mod position_counter; -pub(crate) mod position_manager; +mod position_manager; mod swap_manager; pub use self::metrics::register_metrics; -pub use arb::Arbitrage; +pub(crate) use arb::Arbitrage; pub use circuit_breaker::ExecutionCircuitBreaker; pub(crate) use circuit_breaker::ValueCircuitBreaker; pub use dex::{Dex, StateReadExt, StateWriteExt}; -pub use position_manager::{PositionManager, PositionRead}; +pub(crate) use position_manager::PositionManager; +pub use position_manager::PositionRead; pub use swap_manager::SwapManager; #[cfg(test)] pub(crate) mod tests;