From 8f90c03106c1ce48f7420522e6bad906bda3a67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20G=C3=B3mez?= Date: Mon, 10 Jun 2024 10:04:21 +0200 Subject: [PATCH] Adjust ZerionBalanceSchema to allow undefined attributes.fungibleInfo.description (#1622) Changes the validation of ZerionBalanceSchema.attributes.fungibleInfo.description in order to allow an undefined value for the field --- .../balances-api/entities/zerion-balance.entity.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/datasources/balances-api/entities/zerion-balance.entity.ts b/src/datasources/balances-api/entities/zerion-balance.entity.ts index 05ccdf308e..c3f9c94a0c 100644 --- a/src/datasources/balances-api/entities/zerion-balance.entity.ts +++ b/src/datasources/balances-api/entities/zerion-balance.entity.ts @@ -28,7 +28,7 @@ const ZerionImplementationSchema = z.object({ const ZerionFungibleInfoSchema = z.object({ name: z.string().nullable(), symbol: z.string().nullable(), - description: z.string().nullable(), + description: z.string().nullish().default(null), icon: z .object({ url: z.string().nullable(), @@ -67,3 +67,5 @@ export const ZerionBalanceSchema = z.object({ export const ZerionBalancesSchema = z.object({ data: z.array(ZerionBalanceSchema), }); + +// TODO: add schema tests.