Skip to content

Commit

Permalink
feat(gui): Only display alert on history page if funds have been lock…
Browse files Browse the repository at this point in the history
…ed (#66)
  • Loading branch information
binarybaron authored Sep 6, 2024
1 parent 5411c05 commit ba4a9bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src-gui/src/renderer/components/alert/SwapStatusAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { GetSwapInfoResponse } from "models/tauriModel";
import {
BobStateName,
GetSwapInfoResponseExt,
isGetSwapInfoResponseRunningSwap,
TimelockCancel,
TimelockNone,
} from "models/tauriModelExt";
Expand Down Expand Up @@ -206,7 +207,7 @@ export default function SwapStatusAlert({
// If the swap is completed, there is no need to display the alert
// TODO: Here we should also check if the swap is in a state where any funds can be lost
// TODO: If the no Bitcoin have been locked yet, we can safely ignore the swap
if (swap.completed) {
if (!isGetSwapInfoResponseRunningSwap(swap)) {
return null;
}

Expand Down

0 comments on commit ba4a9bd

Please sign in to comment.