|
|
|
@ -8,7 +8,7 @@ use crate::{bitcoin, monero};
|
|
|
|
|
use anyhow::{bail, Context, Result};
|
|
|
|
|
use rand::rngs::OsRng;
|
|
|
|
|
use tokio::select;
|
|
|
|
|
use tracing::{info, trace};
|
|
|
|
|
use tracing::trace;
|
|
|
|
|
|
|
|
|
|
pub fn is_complete(state: &BobState) -> bool {
|
|
|
|
|
matches!(
|
|
|
|
@ -159,8 +159,6 @@ async fn next_state(
|
|
|
|
|
BobState::XmrLocked(state) => {
|
|
|
|
|
let tx_lock_status = bitcoin_wallet.subscribe_to(state.tx_lock.clone()).await;
|
|
|
|
|
|
|
|
|
|
info!("{:?}", tx_lock_status);
|
|
|
|
|
|
|
|
|
|
if let ExpiredTimelocks::None = state.expired_timelock(bitcoin_wallet).await? {
|
|
|
|
|
// Alice has locked Xmr
|
|
|
|
|
// Bob sends Alice his key
|
|
|
|
|