diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/webhooks/components/webhooks.client.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/webhooks/components/webhooks.client.tsx index 3f68cdb8aac..d6d7a719de5 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/webhooks/components/webhooks.client.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/webhooks/components/webhooks.client.tsx @@ -2,9 +2,11 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; +import { UnderlineLink } from "@workspace/ui/components/UnderlineLink"; import { formatDistanceToNow } from "date-fns"; import { DotIcon, + InfoIcon, MoreVerticalIcon, PencilIcon, PlusIcon, @@ -25,6 +27,7 @@ import { updateWebhook, } from "@/api/universal-bridge/developer"; import { GenericLoadingPage } from "@/components/blocks/skeletons/GenericLoadingPage"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; import { Checkbox, CheckboxWithLabel } from "@/components/ui/checkbox"; @@ -435,28 +438,30 @@ function BridgeWebhookModalContent( )} /> - ( - - Version - - - Select the data format of the webhook payload (v2 recommended, - v1 for legacy users). - - - - )} - /> + {props.type === "edit" && props.webhook.version === 1 && ( + ( + + Version + + + Select the data format of the webhook payload (v2 recommended, + v1 for legacy users). + + + + )} + /> + )} {props.type === "create" && (
@@ -486,6 +491,22 @@ function BridgeWebhookModalContent(
)} + + + Verify payload before processing + + Make sure to verify receiver, destination chain, token address and + amount to ensure that it represents the expected state of the + transaction before processing it in your backend.{" "} + + Learn more + + + +