Skip to content

Commit bcbb3f5

Browse files
[X402] Simplify FacilitatorNetworkSchema to accept any string (#8331)
1 parent 931c730 commit bcbb3f5

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

.changeset/five-plums-kiss.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+
Loosen network schema

packages/thirdweb/src/x402/schemas.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,7 @@ import {
1111
import { z } from "zod";
1212
import type { Chain } from "../chains/types.js";
1313

14-
const FacilitatorNetworkSchema = z.union([
15-
z.literal("base-sepolia"),
16-
z.literal("base"),
17-
z.literal("avalanche-fuji"),
18-
z.literal("avalanche"),
19-
z.literal("iotex"),
20-
z.literal("solana-devnet"),
21-
z.literal("solana"),
22-
z.literal("sei"),
23-
z.literal("sei-testnet"),
24-
z.string().refine((value) => value.startsWith("eip155:"), {
25-
message: "Invalid network",
26-
}),
27-
]);
14+
const FacilitatorNetworkSchema = z.string();
2815

2916
export type FacilitatorNetwork = z.infer<typeof FacilitatorNetworkSchema>;
3017

0 commit comments

Comments
 (0)