Skip to content

Commit 3fb4390

Browse files
authored
Merge branch 'main' into yash/support
2 parents 91563af + ce85be3 commit 3fb4390

File tree

53 files changed

+1492
-209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1492
-209
lines changed

.changeset/loud-clocks-begin.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/ninety-heads-work.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/dashboard/framer-rewrites.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,6 @@ module.exports = [
6262
// -- universal bridge landing pages --
6363
"/universal-bridge-regions/:region_slug",
6464
"/enterprise",
65+
"/token",
66+
"/vault",
6567
];

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/@/components/misc/AnnouncementBanner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function AnnouncementBanner() {
4747
return (
4848
<AnnouncementBannerUI
4949
href="https://blog.thirdweb.com/the-fastest-way-to-build-web3-applications/"
50-
label="We have re-branded our Engine, Universal Bridge, and Connect products. Please read the full blog post for details on changes"
50+
label="We have re-branded our Engine, Payments, and Connect products. Please read the full blog post for details on changes"
5151
trackingLabel="product-rebrand"
5252
/>
5353
);

apps/dashboard/src/app/(app)/(dashboard)/(bridge)/routes/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
type SearchParams,
1111
} from "./components/server/routes-table";
1212

13-
const title = "Universal Bridge Routes: Swap, Bridge, and Onramp";
13+
const title = "Payments Routes: Swap, Bridge, and Onramp";
1414
const description =
1515
"A list of token routes for swapping, bridging, and on-ramping between EVM chains with thirdweb.";
1616

@@ -66,7 +66,7 @@ export default async function RoutesPage(props: {
6666
<div className="relative flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between">
6767
<div className="flex flex-col gap-1">
6868
<h3 className="font-medium text-lg">
69-
Get Started with Universal Bridge
69+
Get Started with thirdweb Payments
7070
</h3>
7171
<p className="text-muted-foreground text-sm">
7272
Simple, instant, and secure payments across any token and chain.

apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/[publish_uri]/page.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { ChakraProviderSetup } from "chakra/ChakraProviderSetup";
22
import { revalidatePath } from "next/cache";
33
import { notFound, redirect } from "next/navigation";
44
import { fetchDeployMetadata } from "thirdweb/contract";
5+
import { getUserThirdwebClient } from "@/api/auth-token";
56
import { ContractPublishForm } from "@/components/contract-components/contract-publish-form";
67
import { getActiveAccountCookie, getJWTCookie } from "@/constants/cookie";
7-
import { getClientThirdwebClient } from "@/constants/thirdweb-client.client";
88
import { serverThirdwebClient } from "@/constants/thirdweb-client.server";
99
import { getLatestPublishedContractsWithPublisherMapping } from "../../../published-contract/[publisher]/[contract_id]/utils/getPublishedContractsWithPublisherMapping";
1010

@@ -68,14 +68,15 @@ export default async function PublishContractPage(
6868
redirect(`/login?next=${encodeURIComponent(pathname)}`);
6969
}
7070

71+
const userThirdwebClient = await getUserThirdwebClient({
72+
teamId: undefined,
73+
});
74+
7175
return (
7276
<div className="container flex max-w-[1130px] flex-col gap-8 py-8">
7377
<ChakraProviderSetup>
7478
<ContractPublishForm
75-
client={getClientThirdwebClient({
76-
jwt: token,
77-
teamId: undefined,
78-
})}
79+
client={userThirdwebClient}
7980
isLoggedIn={!!token}
8081
onPublishSuccess={async () => {
8182
"use server";

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/WebhooksTable.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ function getEventType(filters: WebhookFilters): string {
3030
return "Unknown";
3131
}
3232

33+
function maskWebhookSecret(secret: string): string {
34+
if (!secret || secret.length <= 3) {
35+
return secret;
36+
}
37+
const lastThreeChars = secret.slice(-3);
38+
const maskedPart = "*".repeat(10);
39+
return maskedPart + lastThreeChars;
40+
}
41+
3342
interface WebhooksTableProps {
3443
webhooks: WebhookResponse[];
3544
projectClientId: string;
@@ -127,6 +136,30 @@ export function ContractsWebhooksTable({
127136
},
128137
header: "Webhook URL",
129138
},
139+
{
140+
accessorKey: "webhook_secret",
141+
cell: ({ getValue }) => {
142+
const secret = getValue() as string;
143+
const maskedSecret = maskWebhookSecret(secret);
144+
return (
145+
<div className="flex items-center gap-2">
146+
<span className="max-w-40 truncate font-mono text-sm">
147+
{maskedSecret}
148+
</span>
149+
<CopyTextButton
150+
className="flex h-6 w-6 items-center justify-center"
151+
copyIconPosition="right"
152+
iconClassName="h-3 w-3"
153+
textToCopy={secret}
154+
textToShow=""
155+
tooltip="Copy Webhook Secret"
156+
variant="ghost"
157+
/>
158+
</div>
159+
);
160+
},
161+
header: "Webhook Secret",
162+
},
130163
{
131164
accessorKey: "created_at",
132165
cell: ({ getValue }) => {

0 commit comments

Comments
 (0)