diff --git a/apps/cow-amm-deployer/src/contexts/ammDataContext.tsx b/apps/cow-amm-deployer/src/contexts/ammDataContext.tsx index d66aca573..8ac8b1d88 100644 --- a/apps/cow-amm-deployer/src/contexts/ammDataContext.tsx +++ b/apps/cow-amm-deployer/src/contexts/ammDataContext.tsx @@ -1,5 +1,6 @@ "use client"; +import { toast } from "@bleu/ui"; import React, { useEffect } from "react"; import useSWR from "swr"; import { Address } from "viem"; @@ -58,13 +59,21 @@ export const AmmDataContextProvider = ({ if (isPonderAPIUpToDate) { mutateAmm(); setIsTransactionAwaiting(false); + toast({ + title: "Transaction confirmed", + description: "The transaction has been confirmed", + variant: "success", + }); } }, [isPonderAPIUpToDate]); useEffect(() => { - if (!["final", "confirmed", "error", "idle"].includes(status || "")) { + if (!["final", "confirmed", "idle"].includes(status || "")) { setIsTransactionAwaiting(true); } + if (status === "error") { + setIsTransactionAwaiting(false); + } }, [status]); useEffect(() => {