diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/client/auth-options-form.client.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/client/auth-options-form.client.tsx index 5669c5d71c9..6288aaa6b1f 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/client/auth-options-form.client.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/client/auth-options-form.client.tsx @@ -133,6 +133,8 @@ export function AuthOptionsForm({ (data) => { if ( data.useSmartAccount && + data.executionMode === "EIP4337" && + data.accountFactoryType === "custom" && data.customAccountFactoryAddress && !isAddress(data.customAccountFactoryAddress) ) { @@ -145,6 +147,23 @@ export function AuthOptionsForm({ path: ["customAccountFactoryAddress"], }, ) + .refine( + (data) => { + if ( + data.useSmartAccount && + data.executionMode === "EIP4337" && + data.accountFactoryType === "custom" && + !data.customAccountFactoryAddress + ) { + return false; + } + return true; + }, + { + message: "Please enter a custom account factory address", + path: ["customAccountFactoryAddress"], + }, + ) .refine( (data) => { if (data.useSmartAccount && (data.defaultChainId ?? 0) <= 0) { @@ -212,7 +231,7 @@ export function AuthOptionsForm({ } let smartAccountOptions: Ecosystem["smartAccountOptions"] | null = null; - if (data.useSmartAccount) { + if (data.useSmartAccount && data.executionMode === "EIP4337") { let accountFactoryAddress: string; switch (data.accountFactoryType) { case "v0.6":