diff --git a/taptrade-cli-demo/coordinator/src/database/mod.rs b/taptrade-cli-demo/coordinator/src/database/mod.rs index 10555e0..d703262 100644 --- a/taptrade-cli-demo/coordinator/src/database/mod.rs +++ b/taptrade-cli-demo/coordinator/src/database/mod.rs @@ -197,7 +197,7 @@ impl CoordinatorDB { bond_address: fetched_values.5, bond_amount_sat: fetched_values.6 as u64, }; - info!( + debug!( "Deleted offer from maker_requests table. Fetched offer: {:#?}", awaiting_bond_offer ); @@ -214,7 +214,7 @@ impl CoordinatorDB { .fetch_and_delete_offer_from_bond_table(&data.robohash_hex) .await?; - info!( + debug!( "DATABASE: Moving maker offer to active trades table. Bond data: {:#?}", data ); @@ -238,6 +238,7 @@ impl CoordinatorDB { .bind(taker_bond_address) .execute(&*self.db_pool) .await?; + debug!("\nDATABASE: moved offer to active trades\n"); Ok(remaining_offer_information.offer_duration_ts) } @@ -246,7 +247,7 @@ impl CoordinatorDB { &self, requested_offer: &OffersRequest, ) -> Result>> { - info!( + debug!( "Fetching suitable offers from db. Specification: {:#?}", requested_offer ); @@ -271,7 +272,7 @@ impl CoordinatorDB { ) .collect(); if available_offers.is_empty() { - info!("No available offers in db..."); + debug!("No available offers in db..."); return Ok(None); } Ok(Some(available_offers)) diff --git a/taptrade-cli-demo/coordinator/src/main.rs b/taptrade-cli-demo/coordinator/src/main.rs index 6436de9..a7b2c69 100755 --- a/taptrade-cli-demo/coordinator/src/main.rs +++ b/taptrade-cli-demo/coordinator/src/main.rs @@ -24,10 +24,11 @@ pub struct Coordinator { #[tokio::main] async fn main() -> Result<()> { env_logger::builder() + .filter_module("coordinator", log::LevelFilter::Debug) .filter_level(log::LevelFilter::Info) .init(); dotenv().ok(); - + debug!("Starting coordinator"); // Initialize the database pool let coordinator = Arc::new(Coordinator { coordinator_db: Arc::new(CoordinatorDB::init().await?), diff --git a/taptrade-cli-demo/trader/src/communication/taker_requests.rs b/taptrade-cli-demo/trader/src/communication/taker_requests.rs index f0fb290..f169673 100644 --- a/taptrade-cli-demo/trader/src/communication/taker_requests.rs +++ b/taptrade-cli-demo/trader/src/communication/taker_requests.rs @@ -7,7 +7,7 @@ impl PublicOffers { pub fn fetch(taker_config: &TraderSettings) -> Result { let amount = taker_config.trade_type.value(); let request = OffersRequest { - buy_offers: taker_config.trade_type.is_buy_order(), + buy_offers: !taker_config.trade_type.is_buy_order(), amount_min_sat: (amount as f64 * 0.9).round() as u64, // range can be made variable in production amount_max_sat: (amount as f64 * 1.1).round() as u64, };