feat(gui): Only display alert on history page if funds have been locked (#66)

This commit is contained in:
binarybaron 2024-09-06 23:55:36 +02:00 committed by GitHub
parent 5411c05d27
commit ba4a9bd9c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,6 +4,7 @@ import { GetSwapInfoResponse } from "models/tauriModel";
import {
BobStateName,
GetSwapInfoResponseExt,
isGetSwapInfoResponseRunningSwap,
TimelockCancel,
TimelockNone,
} from "models/tauriModelExt";
@ -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;
}