Don't spam the user while waiting for BTC

pull/616/head
Thomas Eizinger 3 years ago
parent 56a48e71ef
commit cacfc50fb2
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96

@ -446,28 +446,26 @@ where
"Waiting for Bitcoin deposit",
);
sync().await?;
max_giveable = loop {
sync().await?;
let new_max_givable = max_giveable_fn().await?;
let new_max_givable = max_giveable_fn().await?;
if new_max_givable > max_giveable {
break new_max_givable;
}
if new_max_givable != max_giveable {
max_giveable = new_max_givable;
tokio::time::sleep(Duration::from_secs(1)).await;
};
let new_balance = balance().await?;
tracing::info!(
%new_balance,
%max_giveable,
"Received Bitcoin",
);
let new_balance = balance().await?;
tracing::info!(%new_balance, %max_giveable, "Received Bitcoin");
if max_giveable >= bid_quote.min_quantity {
break;
} else {
tracing::info!("Deposited amount is less than `min_quantity`",);
}
if max_giveable < bid_quote.min_quantity {
tracing::info!("Deposited amount is less than `min_quantity`");
continue;
}
tokio::time::sleep(Duration::from_secs(1)).await;
break;
}
};

Loading…
Cancel
Save