Skip to content

Commit e33b9a8

Browse files
committed
chore: add seconds to the form
1 parent f423571 commit e33b9a8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

advanced/dapps/smart-sessions-demo/src/schema/DCAFormSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const dcaFormSchema = z.object({
3333
message: "Must be at least 1.",
3434
}),
3535

36-
intervalUnit: z.enum(["minute", "hour", "day", "week"], {
36+
intervalUnit: z.enum(["second","minute", "hour", "day", "week"], {
3737
required_error: "Unit required",
3838
}),
3939

advanced/dapps/smart-sessions-demo/src/utils/DCAUtils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const assetsToBuy = [
1717
];
1818

1919
export const intervalOptions = [
20+
{ value: "second", label: "Second" },
2021
{ value: "minute", label: "Minute" },
2122
{ value: "hour", label: "Hour" },
2223
{ value: "day", label: "Day" },
@@ -55,6 +56,7 @@ export function calculateInterval(
5556
intervalUnit: string,
5657
): number {
5758
const unitToMilliseconds: Record<string, number> = {
59+
second: 1000,
5860
minute: 60 * 1000,
5961
hour: 60 * 60 * 1000,
6062
day: 24 * 60 * 60 * 1000,

0 commit comments

Comments
 (0)