Skip to content

Commit 218dd29

Browse files
committed
Merge branch 'main' into np/gasPriceFix
2 parents 341b427 + 6e62a3a commit 218dd29

File tree

52 files changed

+2847
-741
lines changed

Some content is hidden

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

52 files changed

+2847
-741
lines changed

.changeset/early-shoes-tap.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
feat(chains): add Etherlink mainnet and testnet chains
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Add fallback mechanism to usePaymentMethods hook for getOwnedTokens failures
6+
7+
When getOwnedTokens batches fail in the usePaymentMethods hook, the system now falls back to getting native token balances for each chain using getWalletBalance. This ensures users can still access their native tokens as payment methods even when the insight API is experiencing issues, providing a more resilient user experience.
8+
9+
The fallback mechanism:
10+
- Catches getOwnedTokens failures and logs warnings
11+
- Falls back to native balance fetching using getWalletBalance for each chain
12+
- Transforms results to match the expected format
13+
- Continues normal processing flow seamlessly

.changeset/free-boxes-lose.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@thirdweb-dev/service-utils": patch
3+
---
4+
5+
add `mcp` to team capabilities

.changeset/whole-bottles-wait.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
TransactionWidget: Hides the "UnknownContract" label

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/@/storybook/stubs.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ export function teamStub(id: string, billingPlan: Team["billingPlan"]): Team {
8585
totalFileSizeBytesLimit: 1_000_000_000,
8686
},
8787
},
88+
mcp: {
89+
enabled: true,
90+
rateLimit: 10,
91+
},
8892
},
8993
createdAt: new Date().toISOString(),
9094
dedicatedSupportChannel: null,

apps/dashboard/src/app/(app)/(dashboard)/(bridge)/utils.ts

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import "server-only";
22

3-
import type { Address } from "thirdweb";
43
import { NEXT_PUBLIC_THIRDWEB_BRIDGE_HOST } from "@/constants/public-envs";
54
import { DASHBOARD_THIRDWEB_SECRET_KEY } from "@/constants/server-envs";
65
import type { Route } from "./types/route";
@@ -10,21 +9,13 @@ export async function getRoutes({
109
offset,
1110
originQuery,
1211
destinationQuery,
13-
originChainId,
14-
destinationChainId,
15-
originTokenAddress,
16-
destinationTokenAddress,
1712
}: {
1813
limit?: number;
1914
offset?: number;
2015
originQuery?: string;
2116
destinationQuery?: string;
22-
originChainId?: number;
23-
destinationChainId?: number;
24-
originTokenAddress?: Address;
25-
destinationTokenAddress?: Address;
2617
} = {}) {
27-
const url = new URL(`${NEXT_PUBLIC_THIRDWEB_BRIDGE_HOST}/v1/routes`);
18+
const url = new URL(`${NEXT_PUBLIC_THIRDWEB_BRIDGE_HOST}/v1/routes/search`);
2819
if (limit) {
2920
url.searchParams.set("limit", limit.toString());
3021
}
@@ -37,20 +28,7 @@ export async function getRoutes({
3728
if (destinationQuery) {
3829
url.searchParams.set("destinationQuery", destinationQuery);
3930
}
40-
if (originChainId) {
41-
url.searchParams.set("originChainId", originChainId.toString());
42-
}
43-
if (destinationChainId) {
44-
url.searchParams.set("destinationChainId", destinationChainId.toString());
45-
}
46-
if (originTokenAddress) {
47-
url.searchParams.set("originTokenAddress", originTokenAddress);
48-
}
49-
if (destinationTokenAddress) {
50-
url.searchParams.set("destinationTokenAddress", destinationTokenAddress);
51-
}
5231
url.searchParams.set("sortBy", "popularity");
53-
// It's faster to filter client side, doesn't seem to be a big performance boost to paginate/filter server side
5432
const routesResponse = await fetch(url, {
5533
headers: {
5634
"x-secret-key": DASHBOARD_THIRDWEB_SECRET_KEY,

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/EngineCloudChartCard/EngineCloudBarChartCardUI.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function EngineCloudBarChartCardUI({
6868
if (data.length === 0 || isAllEmpty) {
6969
return (
7070
<EmptyStateCard
71-
link="https://portal.thirdweb.com/engine/v3"
71+
link="https://portal.thirdweb.com/transactions"
7272
metric="Transactions"
7373
/>
7474
);

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function EngineLegacyBannerUI(props: {
104104
<Button asChild size="sm" variant="outline">
105105
<Link
106106
className="gap-2 bg-background"
107-
href="https://portal.thirdweb.com/engine/v3"
107+
href="https://portal.thirdweb.com/transactions"
108108
rel="noopener noreferrer"
109109
target="_blank"
110110
>

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}

0 commit comments

Comments
 (0)