From dec3c3802debfe8c390743b49b907a7c18af4bd7 Mon Sep 17 00:00:00 2001 From: pociej Date: Tue, 18 Jun 2024 15:20:27 +0200 Subject: [PATCH] chore: cleanup debug logs no issue --- deploy/backend/Dockerfile | 1 - frontend/src/hooks/events/useEvents.ts | 5 ++++- frontend/src/hooks/events/useYagnaEvents.tsx | 1 - frontend/src/types/events.ts | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/deploy/backend/Dockerfile b/deploy/backend/Dockerfile index 74ef5c0..64c2ddb 100644 --- a/deploy/backend/Dockerfile +++ b/deploy/backend/Dockerfile @@ -7,7 +7,6 @@ RUN curl -L https://join.golem.network/as-requestor --output as-requestor.sh RUN chmod +x as-requestor.sh ENV PATH="${PATH}:/root/.local/bin" -ENV DEBUG="task-executor:*" # switch yagna version if necessery ARG YAGNA_VERSION diff --git a/frontend/src/hooks/events/useEvents.ts b/frontend/src/hooks/events/useEvents.ts index 7e58482..c6037a8 100644 --- a/frontend/src/hooks/events/useEvents.ts +++ b/frontend/src/hooks/events/useEvents.ts @@ -62,12 +62,15 @@ export const useEvents = ({ useEffect(() => { if (currentEvents) { + console.log("currentEvents", currentEvents); currentEvents.forEach((e: any) => { if (!previousEvents.current.find((p) => getId(p) === getId(e))) { events$.current?.next(e); } }); - setIsFirstRun(false); + setTimeout(() => { + setIsFirstRun(false); + }, 1000); if (!isFirstRun) { previousEvents.current = currentEvents; } diff --git a/frontend/src/hooks/events/useYagnaEvents.tsx b/frontend/src/hooks/events/useYagnaEvents.tsx index 4720616..d048434 100644 --- a/frontend/src/hooks/events/useYagnaEvents.tsx +++ b/frontend/src/hooks/events/useYagnaEvents.tsx @@ -64,7 +64,6 @@ export const useYagnaEvent = (event: yagnaEventTopic) => { socketRef.current.connect(); socketRef.current.on("event", (data: any) => { - console.log("event", data, isInTopic(event)(data.event.eventType)); if (!isInTopic(event)(data.event.eventType)) return; emit({ id: data.id, ...data[event] }, data.event.eventType); }); diff --git a/frontend/src/types/events.ts b/frontend/src/types/events.ts index fd2b0ae..5a43e89 100644 --- a/frontend/src/types/events.ts +++ b/frontend/src/types/events.ts @@ -56,6 +56,7 @@ export type Payload = { agreementId: string; invoiceId: string; transactionId?: string; + amount: string; }; [Event.AGREEMENT_SIGNED]: {