Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ export function AuthOptionsForm({ ecosystem }: { ecosystem: Ecosystem }) {
.optional(),
useSmartAccount: z.boolean(),
sponsorGas: z.boolean(),
defaultChainId: z.coerce.number({
invalid_type_error: "Please enter a valid chain ID",
}),
defaultChainId: z.coerce
.number({
invalid_type_error: "Please enter a valid chain ID",
})
.optional(),
accountFactoryType: z.enum(["v0.6", "v0.7", "custom"]),
customAccountFactoryAddress: z.string().optional(),
})
Expand All @@ -108,6 +110,18 @@ export function AuthOptionsForm({ ecosystem }: { ecosystem: Ecosystem }) {
path: ["customAccountFactoryAddress"],
},
)
.refine(
(data) => {
if (data.useSmartAccount && (data.defaultChainId ?? 0) <= 0) {
return false;
}
return true;
},
{
message: "Please enter a valid chain ID",
path: ["defaultChainId"],
},
)
.refine(
(data) => {
if (data.useCustomAuth && !data.customAuthEndpoint) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function UpdatePartnerModal({

return (
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger>{children}</DialogTrigger>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent className="z-[10001]" dialogOverlayClassName="z-[10000]">
<DialogHeader className="mb-2">
<DialogTitle>Update {partner.name}</DialogTitle>
Expand Down
Loading