From 7dbd62ea17612bd5577a95c87f312ad7f3300965 Mon Sep 17 00:00:00 2001 From: Pranav Kakaraparti Date: Wed, 23 Aug 2023 18:14:38 -0500 Subject: [PATCH] fix: transfer request claim is optional parameter --- server/handlers/transferHandler/schemas.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/handlers/transferHandler/schemas.js b/server/handlers/transferHandler/schemas.js index affd107d..67a4a274 100644 --- a/server/handlers/transferHandler/schemas.js +++ b/server/handlers/transferHandler/schemas.js @@ -12,8 +12,7 @@ const transferPostSchema = Joi.alternatives() tokens: Joi.array().items(Joi.string()).required().unique(), sender_wallet: Joi.alternatives().try(Joi.string()).required(), receiver_wallet: Joi.alternatives().try(Joi.string()).required(), - // TODO: add boolean for claim, but default to false. - claim: Joi.boolean(), + claim: Joi.boolean().default(false), }), otherwise: Joi.object({ bundle: Joi.object({ @@ -21,7 +20,7 @@ const transferPostSchema = Joi.alternatives() }).required(), sender_wallet: Joi.string().required(), receiver_wallet: Joi.string().required(), - claim: Joi.boolean().required(), + claim: Joi.boolean().default(false), }), }, );