diff --git a/migrations/__tests__/00004_counterfactual-safes.spec.ts b/migrations/__tests__/00004_counterfactual-safes.spec.ts index ef37eab0aa..46bb54a389 100644 --- a/migrations/__tests__/00004_counterfactual-safes.spec.ts +++ b/migrations/__tests__/00004_counterfactual-safes.spec.ts @@ -17,7 +17,7 @@ interface CounterfactualSafesRow { updated_at: Date; id: number; chain_id: string; - creator:`0x${string}`; + creator: `0x${string}`; fallback_handler: `0x${string}`; owners: `0x${string}`[]; predicted_address: `0x${string}`; diff --git a/src/domain/accounts/counterfactual-safes/entities/counterfactual-safe.entity.ts b/src/domain/accounts/counterfactual-safes/entities/counterfactual-safe.entity.ts index e31b52f772..eba2fc241f 100644 --- a/src/domain/accounts/counterfactual-safes/entities/counterfactual-safe.entity.ts +++ b/src/domain/accounts/counterfactual-safes/entities/counterfactual-safe.entity.ts @@ -9,10 +9,10 @@ export const CounterfactualSafeSchema = RowSchema.extend({ chain_id: z.string(), creator: AddressSchema, fallback_handler: AddressSchema, - owners: z.array(AddressSchema), + owners: z.array(AddressSchema).min(1), predicted_address: AddressSchema, - salt_nonce: HexSchema, + salt_nonce: z.string(), singleton_address: AddressSchema, - threshold: z.number().int().gte(0), + threshold: z.number().int().gte(1), account_id: AccountSchema.shape.id, }); diff --git a/src/domain/accounts/counterfactual-safes/entities/create-counterfactual-safe.dto.entity.ts b/src/domain/accounts/counterfactual-safes/entities/create-counterfactual-safe.dto.entity.ts index c61769f7f0..3458ef553b 100644 --- a/src/domain/accounts/counterfactual-safes/entities/create-counterfactual-safe.dto.entity.ts +++ b/src/domain/accounts/counterfactual-safes/entities/create-counterfactual-safe.dto.entity.ts @@ -26,9 +26,9 @@ export class CreateCounterfactualSafeDto export const CreateCounterfactualSafeDtoSchema = z.object({ chain_id: z.string(), fallback_handler: AddressSchema, - owners: z.array(AddressSchema), + owners: z.array(AddressSchema).min(1), predicted_address: AddressSchema, - salt_nonce: HexSchema, + salt_nonce: z.string(), singleton_address: AddressSchema, threshold: z.number().int().gte(1), });