Don't stutter

This commit is contained in:
Thomas Eizinger 2021-04-16 11:48:15 +10:00
parent 7adeaae12d
commit e266fb07ef
No known key found for this signature in database
GPG key ID: 651AC83A6C6C8B96
12 changed files with 20 additions and 20 deletions

View file

@ -26,7 +26,7 @@ pub struct Swap {
pub bitcoin_wallet: Arc<bitcoin::Wallet>,
pub monero_wallet: Arc<monero::Wallet>,
pub env_config: env::Config,
pub swap_id: Uuid,
pub id: Uuid,
pub receive_monero_address: monero::Address,
}
@ -92,7 +92,7 @@ impl Builder {
db: self.db,
bitcoin_wallet: self.bitcoin_wallet.clone(),
monero_wallet: self.monero_wallet.clone(),
swap_id: self.swap_id,
id: self.swap_id,
env_config: self.env_config,
receive_monero_address: self.receive_monero_address,
})

View file

@ -33,7 +33,7 @@ pub async fn run_until(
while !is_target_state(&current_state) {
current_state = next_state(
swap.swap_id,
swap.id,
current_state,
&mut swap.event_loop_handle,
swap.bitcoin_wallet.as_ref(),
@ -45,7 +45,7 @@ pub async fn run_until(
let db_state = current_state.clone().into();
swap.db
.insert_latest_state(swap.swap_id, Swap::Bob(db_state))
.insert_latest_state(swap.id, Swap::Bob(db_state))
.await?;
}