Move "swap started" UI message after swap confirmed with ASB

The "swap started" message was being too early, before the ASB had
confirmed they could perform the swap. This was leading to a confusing
scenario where the UI incorrectly indicated to the user that the swap
had started. Users were trying to resume or refund the swaps but there
was no swap id in the db. Moving this message after the swap setup
should resolve this problem. Closes #756, #729, #560.
pull/763/head
rishflab 3 years ago
parent 413a2d37aa
commit 0afe83e4e8

@ -110,7 +110,7 @@ async fn main() -> Result<()> {
)
.await?;
tracing::info!(%amount, %fees, %swap_id, "Starting new swap");
tracing::info!(%amount, %fees, "Determined swap amount");
db.insert_peer_id(swap_id, seller_peer_id).await?;
db.insert_monero_address(swap_id, monero_receive_address)

@ -82,6 +82,8 @@ async fn next_state(
})
.await?;
tracing::info!(%swap_id, "Starting new swap");
BobState::SwapSetupCompleted(state2)
}
BobState::SwapSetupCompleted(state2) => {

Loading…
Cancel
Save