Skip to content

Commit

Permalink
Fix missing autowithdraw settings validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzyis committed Oct 18, 2024
1 parent ad1244c commit 6cc49e9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand All @@ -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({
Expand Down Expand Up @@ -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({
Expand Down

0 comments on commit 6cc49e9

Please sign in to comment.