Skip to content

Commit

Permalink
commented integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
psorinionut committed May 30, 2024
1 parent 2729ddf commit ee2d464
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions dex/interactor/src/dex_interact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,30 +79,30 @@ impl DexInteract {
}

// Just for demo, still TODO
#[cfg(test)]
pub mod integration_tests {
use crate::{dex_interact_cli::SwapArgs, pair, DexInteract};
// #[cfg(test)]
// pub mod integration_tests {
// use crate::{dex_interact_cli::SwapArgs, pair, DexInteract};

#[test]
fn test_full_farm_scenario() {
let rt = crate::tokio::runtime::Runtime::new().unwrap();
// #[test]
// fn test_full_farm_scenario() {
// let rt = crate::tokio::runtime::Runtime::new().unwrap();

rt.block_on(async {
let mut dex_interact = DexInteract::init().await;
dex_interact.register_wallets();
let args = SwapArgs {
amount: 10_000_000_000_000_000_000u128,
min_amount: 1_000_000_000_000u128,
};
let result = pair::swap_tokens_fixed_input(&mut dex_interact, &args).await;
println!("result {:#?}", result);
// let args =PairArgs {
// first_payment_amount: 0u128,
// second_payment_amount: 0u128,
// first_token_amount_min: 0u128,
// second_token_amount_min: 0u128,
// };
// dex_interact.full_farm_scenario(&args).await;
});
}
}
// rt.block_on(async {
// let mut dex_interact = DexInteract::init().await;
// dex_interact.register_wallets();
// let args = SwapArgs {
// amount: 10_000_000_000_000_000_000u128,
// min_amount: 1_000_000_000_000u128,
// };
// let result = pair::swap_tokens_fixed_input(&mut dex_interact, &args).await;
// println!("result {:#?}", result);
// // let args =PairArgs {
// // first_payment_amount: 0u128,
// // second_payment_amount: 0u128,
// // first_token_amount_min: 0u128,
// // second_token_amount_min: 0u128,
// // };
// // dex_interact.full_farm_scenario(&args).await;
// });
// }
// }

0 comments on commit ee2d464

Please sign in to comment.