Skip to content

Commit

Permalink
chore: include transaction.refunded in final swap states (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 authored Dec 19, 2024
1 parent aaafe08 commit 6cdf23c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/SwapChecker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ class BoltzWebSocket {
return;
}

log.debug(
`WebSocket message: ${JSON.stringify(data, null, 2)}`,
);
log.debug(`WebSocket message:`, data);

if (data.event === "update" && data.channel === "swap.update") {
const swapUpdates = data.args as SwapStatus[];
Expand Down
2 changes: 2 additions & 0 deletions src/consts/SwapStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const swapStatusFailed = {
InvoiceFailedToPay: "invoice.failedToPay",
TransactionFailed: "transaction.failed",
TransactionLockupFailed: "transaction.lockupFailed",
TransactionRefunded: "transaction.refunded",
};

export const swapStatusSuccess = {
Expand All @@ -28,4 +29,5 @@ export const swapStatusFinal = [
swapStatusFailed.SwapExpired,
swapStatusFailed.SwapRefunded,
swapStatusFailed.InvoiceFailedToPay,
swapStatusFailed.TransactionRefunded,
].concat(Object.values(swapStatusSuccess));

0 comments on commit 6cdf23c

Please sign in to comment.