diff --git a/src/components/landing/PortfolioSection.tsx b/src/components/landing/PortfolioSection.tsx index 79693124..44ce1773 100644 --- a/src/components/landing/PortfolioSection.tsx +++ b/src/components/landing/PortfolioSection.tsx @@ -901,8 +901,27 @@ export default function PortfolioSection() { const handleStop = async () => { setIsStopping(true); try { - await stopStrategy(); - setFreshStartRequested(false); + const result = await stopStrategy(); + if (result?.status === "stopped") { + setFreshStartRequested(false); + if (result?.warning) { + toast({ + title: "Strategy stopped", + description: `Stopped with warning: ${result.warning}`, + }); + } + } else if (result?.status === "already_stopped") { + setFreshStartRequested(false); + toast({ + title: "Strategy already stopped", + description: "The live strategy was already inactive.", + }); + } else { + toast({ + title: "Stop failed", + description: result?.message || result?.status || "Unable to stop strategy.", + }); + } } catch (error: any) { toast({ title: "Stop failed",