mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
feat (Bob): Log extensive information about deposit requirements
This commit is contained in:
parent
49a7f7eed6
commit
55b67d31d4
@ -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…
Reference in New Issue
Block a user