Skip to content
Merged
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 @@ -133,6 +133,8 @@ export function AuthOptionsForm({
(data) => {
if (
data.useSmartAccount &&
data.executionMode === "EIP4337" &&
data.accountFactoryType === "custom" &&
data.customAccountFactoryAddress &&
!isAddress(data.customAccountFactoryAddress)
) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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":
Expand Down
Loading