Skip to content

Commit

Permalink
fix: ignore error when server does not want to claim cooperatively
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Dec 31, 2024
1 parent 7ece218 commit bad9e60
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/SwapChecker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,18 @@ export const SwapChecker = () => {
true,
);
} catch (e) {
const err: unknown =
typeof e.json === "function" ? (await e.json()).error : e;
if (err === "swap not eligible for a cooperative claim") {
log.debug(
`Server did not want help claiming ${currentSwap.id}`,
);
return;
}

const msg =
"creating cooperative signature for submarine swap claim failed";
log.warn(msg, e);
log.warn(msg, err);
notify("error", msg);
}
}
Expand Down

0 comments on commit bad9e60

Please sign in to comment.