cli: log the reason we can't find tx_cancel (#289)

* cli: log the reason we can't find tx_cancel

When we can't find tx_cancel even though the cancel timelock
expired, we publish it ourselves.

However, some users had a problem where the tx_cancel wasn't
found even though it was already published.
This leads to the cli getting stuck in `CancelTimelockExpired`
when it should go to `BtcCancelled`.
This commit introduces an additional log statement that will
help us narrow down why that is.

* gui: update the documentation icon
This commit is contained in:
Raphael 2025-04-16 13:44:37 +02:00 committed by GitHub
parent b9609b979b
commit 24cfa71932
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View file

@ -7,7 +7,7 @@ import UnfinishedSwapsAlert from "../alert/UnfinishedSwapsAlert";
import LinkIconButton from "../icons/LinkIconButton";
import BackgroundRefundAlert from "../alert/BackgroundRefundAlert";
import MatrixIcon from "../icons/MatrixIcon";
import { BookRounded } from "@material-ui/icons";
import { BookRounded, MenuBook } from "@material-ui/icons";
const useStyles = makeStyles((theme) => ({
outer: {
@ -50,7 +50,7 @@ export default function NavigationFooter() {
<Tooltip title="Read our official documentation">
<span>
<LinkIconButton url="https://docs.unstoppableswap.net">
<BookRounded />
<MenuBook />
</LinkIconButton>
</span>
</Tooltip>

View file

@ -416,7 +416,11 @@ async fn next_state(
event_emitter
.emit_swap_progress_event(swap_id, TauriSwapProgressEvent::CancelTimelockExpired);
if state4.check_for_tx_cancel(bitcoin_wallet).await.is_err() {
if let Err(err) = state4.check_for_tx_cancel(bitcoin_wallet).await {
tracing::debug!(
%err,
"Couldn't find tx_cancel yet, publishing ourselves"
);
state4.submit_tx_cancel(bitcoin_wallet).await?;
}