Skip to content

Commit c2956ba

Browse files
authored
Merge branch 'main' into greg/tool-5060-update-routes-page-to-use-search
2 parents 792b052 + ce85be3 commit c2956ba

File tree

8 files changed

+728
-661
lines changed

8 files changed

+728
-661
lines changed

apps/dashboard/src/@/api/webhook-configs.ts

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,3 +310,53 @@ export async function deleteWebhookConfig(props: {
310310
status: "success",
311311
};
312312
}
313+
314+
type TestDestinationUrlResponse =
315+
| {
316+
result: {
317+
httpStatusCode: number;
318+
httpResponseBody: string;
319+
};
320+
status: "success";
321+
}
322+
| {
323+
body: string;
324+
reason: string;
325+
status: "error";
326+
};
327+
328+
export async function testDestinationUrl(props: {
329+
teamIdOrSlug: string;
330+
projectIdOrSlug: string;
331+
destinationUrl: string;
332+
}): Promise<TestDestinationUrlResponse> {
333+
const authToken = await getAuthToken();
334+
335+
if (!authToken) {
336+
return {
337+
body: "Authentication required",
338+
reason: "no_auth_token",
339+
status: "error",
340+
};
341+
}
342+
343+
const resp = await fetch(
344+
`${NEXT_PUBLIC_THIRDWEB_API_HOST}/v1/teams/${props.teamIdOrSlug}/projects/${props.projectIdOrSlug}/webhook-configs/test-destination-url`,
345+
{
346+
body: JSON.stringify({ destinationUrl: props.destinationUrl }),
347+
headers: {
348+
Authorization: `Bearer ${authToken}`,
349+
"Content-Type": "application/json",
350+
},
351+
method: "POST",
352+
},
353+
);
354+
if (!resp.ok) {
355+
return {
356+
body: await resp.text(),
357+
reason: "unknown",
358+
status: "error",
359+
};
360+
}
361+
return await resp.json();
362+
}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/nft/launch/launch-nft.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ export function LaunchNFT(props: {
155155
return shouldDeployERC721 ? "erc721" : "erc1155";
156156
}, [formValues.nfts]);
157157

158-
const canEnableGasless =
159-
props.teamPlan !== "free" && activeWallet?.id === "inApp";
158+
// TODO: enable later when bundler changes are done
159+
const canEnableGasless = false; // props.teamPlan !== "free" && activeWallet?.id === "inApp";
160160
const [isGasless, setIsGasless] = useState(canEnableGasless);
161-
const showGaslessSection = activeWallet?.id === "inApp";
161+
const showGaslessSection = false; // activeWallet?.id === "inApp";
162162

163163
const contractLink = contractAddressRef.current
164164
? `/team/${props.teamSlug}/${props.projectSlug}/contract/${formValues.collectionInfo.chain}/${contractAddressRef.current}`

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/launch/launch-token.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ export function LaunchTokenStatus(props: {
6464
const activeWallet = useActiveWallet();
6565
const walletRequiresApproval = activeWallet?.id !== "inApp";
6666

67-
const canEnableGasless =
68-
props.teamPlan !== "free" && activeWallet?.id === "inApp";
67+
// TODO: enable later when bundler changes are done
68+
const canEnableGasless = false; //props.teamPlan !== "free" && activeWallet?.id === "inApp";
6969
const [isGasless, setIsGasless] = useState(canEnableGasless);
70-
const showGaslessSection = activeWallet?.id === "inApp";
70+
const showGaslessSection = false; // activeWallet?.id === "inApp";
7171
const { idToChain } = useAllChainsData();
7272
const chainMetadata = idToChain.get(Number(formValues.chain));
7373

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/create-webhook-config-modal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { WebhookConfigModal } from "./webhook-config-modal";
55
interface CreateWebhookConfigModalProps {
66
open: boolean;
77
onOpenChange: (open: boolean) => void;
8+
onSuccess: () => void;
89
teamSlug: string;
910
projectSlug: string;
1011
topics: Topic[];
@@ -19,6 +20,7 @@ export function CreateWebhookConfigModal(props: CreateWebhookConfigModalProps) {
1920
mode="create"
2021
onOpenChange={props.onOpenChange}
2122
open={props.open}
23+
onSuccess={props.onSuccess}
2224
projectSlug={props.projectSlug}
2325
supportedChainIds={props.supportedChainIds}
2426
teamSlug={props.teamSlug}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/edit-webhook-config-modal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { WebhookConfigModal } from "./webhook-config-modal";
55
interface EditWebhookConfigModalProps {
66
open: boolean;
77
onOpenChange: (open: boolean) => void;
8+
onSuccess: () => void;
89
teamSlug: string;
910
projectSlug: string;
1011
topics: Topic[];
@@ -20,6 +21,7 @@ export function EditWebhookConfigModal(props: EditWebhookConfigModalProps) {
2021
mode="edit"
2122
onOpenChange={props.onOpenChange}
2223
open={props.open}
24+
onSuccess={props.onSuccess}
2325
projectSlug={props.projectSlug}
2426
supportedChainIds={props.supportedChainIds}
2527
teamSlug={props.teamSlug}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/topic-selector-modal.tsx

Lines changed: 461 additions & 593 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)