mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-30 20:46:33 -05:00
Remove unnecessary swap suspension listener from determine_btc_to_swap call in BuyXmr
This commit is contained in:
parent
c7f411c8c9
commit
a53a420794
1 changed files with 7 additions and 16 deletions
|
|
@ -368,23 +368,14 @@ impl Request {
|
|||
estimate_fee,
|
||||
);
|
||||
|
||||
let (amount, fees) = tokio::select! {
|
||||
biased;
|
||||
_ = context.swap_lock.listen_for_swap_force_suspension() => {
|
||||
tracing::debug!("Shutdown signal received, exiting");
|
||||
bail!("Shutdown signal received");
|
||||
},
|
||||
result = determine_amount => {
|
||||
match result {
|
||||
Ok(val) => val,
|
||||
Err(error) => match error.downcast::<ZeroQuoteReceived>() {
|
||||
Ok(_) => {
|
||||
bail!("Seller's XMR balance is currently too low to initiate a swap, please try again later")
|
||||
}
|
||||
Err(other) => bail!(other),
|
||||
},
|
||||
let (amount, fees) = match determine_amount.await {
|
||||
Ok(val) => val,
|
||||
Err(error) => match error.downcast::<ZeroQuoteReceived>() {
|
||||
Ok(_) => {
|
||||
bail!("Seller's XMR balance is currently too low to initiate a swap, please try again later")
|
||||
}
|
||||
}
|
||||
Err(other) => bail!(other),
|
||||
},
|
||||
};
|
||||
|
||||
tracing::info!(%amount, %fees, "Determined swap amount");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue