diff --git a/packages/contracts/src/schemas/configs.ts b/packages/contracts/src/schemas/configs.ts index 1a2d9fd3b..fbf20bf9a 100644 --- a/packages/contracts/src/schemas/configs.ts +++ b/packages/contracts/src/schemas/configs.ts @@ -206,8 +206,8 @@ export type ShowAverage = z.infer; export const ColorHexValueSchema = z.string().regex(/^#([\da-f]{3}){1,2}$/i); export type ColorHexValue = z.infer; -export const DifficultySchema = z.enum(["normal", "expert", "master"]); -export type Difficulty = z.infer; +export const DifficultySchema = Shared.DifficultySchema; +export type Difficulty = Shared.Difficulty; export const ModeSchema = Shared.ModeSchema; export type Mode = Shared.Mode; diff --git a/packages/contracts/src/schemas/shared.ts b/packages/contracts/src/schemas/shared.ts index f73a9b136..e92e86919 100644 --- a/packages/contracts/src/schemas/shared.ts +++ b/packages/contracts/src/schemas/shared.ts @@ -1,7 +1,10 @@ import { z } from "zod"; -import { DifficultySchema } from "./configs"; import { StringNumberSchema } from "./util"; +//used by config +export const DifficultySchema = z.enum(["normal", "expert", "master"]); +export type Difficulty = z.infer; + //used by user and config export const PersonalBestSchema = z.object({ acc: z.number().nonnegative().max(100),