From 6cc49e937b89fb3ea5f8d1c76e2cf68b9c662c6b Mon Sep 17 00:00:00 2001 From: ekzyis Date: Fri, 18 Oct 2024 18:57:39 +0200 Subject: [PATCH] Fix missing autowithdraw settings validation --- lib/validate.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/validate.js b/lib/validate.js index 00215d1ac..9c53047f5 100644 --- a/lib/validate.js +++ b/lib/validate.js @@ -726,7 +726,8 @@ export const lnbitsSchema = object().shape({ test: invoiceKey => adminKey !== invoiceKey, message: 'invoice key cannot be the same as admin key' }) - }) + }), + ...autowithdrawSchemaMembers // need to set order to avoid cyclic dependencies in Yup schema // see https://github.com/jquense/yup/issues/176#issuecomment-367352042 }, ['adminKey', 'invoiceKey']) @@ -745,7 +746,8 @@ export const nwcSchema = object().shape({ test: nwcUrlRecv => nwcUrlRecv !== nwcUrl, message: 'connection for receiving cannot be the same as for sending' }) - }) + }), + ...autowithdrawSchemaMembers }, ['nwcUrl', 'nwcUrlRecv']) export const blinkSchema = object({ @@ -796,7 +798,8 @@ export const phoenixdSchema = object().shape({ test: secondary => primary !== secondary, message: 'secondary password cannot be the same as primary password' }) - }) + }), + ...autowithdrawSchemaMembers }, ['primaryPassword', 'secondaryPassword']) export const bioSchema = object({