From f5cfe014be19d33de28dbbc684f2e7a1edb89bd0 Mon Sep 17 00:00:00 2001 From: rishflab Date: Fri, 15 Jan 2021 09:45:00 +1100 Subject: [PATCH] Fix imports --- swap/src/protocol/alice/swap.rs | 5 ++--- swap/src/protocol/bob/swap.rs | 10 ++++++---- swap/tests/testutils/mod.rs | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/swap/src/protocol/alice/swap.rs b/swap/src/protocol/alice/swap.rs index dd16d506..0f8cf54c 100644 --- a/swap/src/protocol/alice/swap.rs +++ b/swap/src/protocol/alice/swap.rs @@ -88,12 +88,11 @@ pub async fn run_until( state: AliceState, is_target_state: fn(&AliceState) -> bool, mut event_loop_handle: EventLoopHandle, - bitcoin_wallet: Arc, - monero_wallet: Arc, + bitcoin_wallet: Arc, + monero_wallet: Arc, config: Config, swap_id: Uuid, db: Database, - // TODO: Remove EventLoopHandle! ) -> Result { info!("Current state:{}", state); if is_target_state(&state) { diff --git a/swap/src/protocol/bob/swap.rs b/swap/src/protocol/bob/swap.rs index 022511d6..038b5523 100644 --- a/swap/src/protocol/bob/swap.rs +++ b/swap/src/protocol/bob/swap.rs @@ -7,7 +7,9 @@ use tracing::info; use uuid::Uuid; use crate::{ + bitcoin, database::{Database, Swap}, + monero, protocol::bob::{self, event_loop::EventLoopHandle, state::*}, ExpiredTimelocks, SwapAmounts, }; @@ -18,8 +20,8 @@ pub async fn swap( state: BobState, event_loop_handle: EventLoopHandle, db: Database, - bitcoin_wallet: Arc, - monero_wallet: Arc, + bitcoin_wallet: Arc, + monero_wallet: Arc, rng: R, swap_id: Uuid, ) -> Result @@ -69,8 +71,8 @@ pub async fn run_until( is_target_state: fn(&BobState) -> bool, mut event_loop_handle: EventLoopHandle, db: Database, - bitcoin_wallet: Arc, - monero_wallet: Arc, + bitcoin_wallet: Arc, + monero_wallet: Arc, mut rng: R, swap_id: Uuid, ) -> Result diff --git a/swap/tests/testutils/mod.rs b/swap/tests/testutils/mod.rs index db5d7ee2..4b1bad00 100644 --- a/swap/tests/testutils/mod.rs +++ b/swap/tests/testutils/mod.rs @@ -32,7 +32,7 @@ pub async fn init_wallets( name: &str, bitcoind: &Bitcoind<'_>, monero: &Monero, - btc_starting_balance: Option<::bitcoin::Amount>, + btc_starting_balance: Option, xmr_starting_balance: Option, config: Config, ) -> (Arc, Arc) {