Merge pull request #1673 from comit-network/bob-extensive-quote-log

feat (Bob): Log extensive information about deposit requirements
pull/1674/head
Byron Hambly 3 weeks ago committed by GitHub
commit 9594b0c46b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -882,19 +882,24 @@ where
loop {
let min_outstanding = bid_quote.min_quantity - max_giveable;
let min_fee = estimate_fee(min_outstanding).await?;
let min_deposit = min_outstanding + min_fee;
let min_bitcoin_lock_tx_fee = estimate_fee(min_outstanding).await?;
let min_deposit_until_swap_will_start = min_outstanding + min_bitcoin_lock_tx_fee;
let max_deposit_until_maximum_amount_is_reached =
maximum_amount - max_giveable + min_bitcoin_lock_tx_fee;
tracing::info!(
"Deposit at least {} to cover the min quantity with fee!",
min_deposit
min_deposit_until_swap_will_start
);
tracing::info!(
%deposit_address,
%min_deposit,
%min_deposit_until_swap_will_start,
%max_deposit_until_maximum_amount_is_reached,
%max_giveable,
%minimum_amount,
%maximum_amount,
%min_bitcoin_lock_tx_fee,
price = %bid_quote.price,
"Waiting for Bitcoin deposit",
);
@ -913,7 +918,7 @@ where
tracing::info!(%new_balance, %max_giveable, "Received Bitcoin");
if max_giveable < bid_quote.min_quantity {
tracing::info!("Deposited amount is less than `min_quantity`");
tracing::info!("Deposited amount is not enough to cover `min_quantity` when accounting for network fees");
continue;
}

Loading…
Cancel
Save