Skip to content

Commit

Permalink
fix: skip payout currency validation for ACCOUNT_BALANCE
Browse files Browse the repository at this point in the history
  • Loading branch information
kewitz committed Dec 6, 2024
1 parent de4ed21 commit ab4f97e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/expenses/PayoutMethodForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ export const validatePayoutMethod = payoutMethod => {
}
}

if (!payoutMethod?.data?.currency) {
set(errors, 'data.currency', createError(ERROR.FORM_FIELD_REQUIRED));
if (payoutMethod?.type !== PayoutMethodType.ACCOUNT_BALANCE) {
if (!payoutMethod.data?.currency) {
set(errors, 'data.currency', createError(ERROR.FORM_FIELD_REQUIRED));
}
}

return errors;
Expand Down

0 comments on commit ab4f97e

Please sign in to comment.